From 21f2a2dd26aeef9266cfa64a112ba0a5b8460f02 Mon Sep 17 00:00:00 2001 From: tianduanrui <2407223896@qq.com> Date: Sun, 19 Nov 2017 13:40:31 +0800 Subject: [PATCH] update nullptr build error --- QQt.pro | 9 ++++----- examples/qqtframe2/link_qqt_library.pri | 8 ++++---- src/frame/qqtwifidbwidget.h | 9 +++++---- src/qqt_install.pri | 4 ++-- src/qqt_library.pri | 5 +++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/QQt.pro b/QQt.pro index fc7c2972..a51fa391 100644 --- a/QQt.pro +++ b/QQt.pro @@ -17,15 +17,13 @@ SUBDIRS = src/qqt.pro #QQt is build #----------------------------------------------------------------- #SUBDIRS += examples/qqtframe3 -# -SUBDIRS += examples/exquisite +#SUBDIRS += examples/exquisite #can't support ios #SUBDIRS += examples/qqtprintsupportexample # SUBDIRS += examples/tabwidgetexamples -# -SUBDIRS += examples/svgtest -SUBDIRS += examples/treeviewexample +#SUBDIRS += examples/svgtest +#SUBDIRS += examples/treeviewexample #----------------------------------------------------------------- #need vlcQt libvlc library @@ -56,6 +54,7 @@ SUBDIRS += examples/treeviewexample #----------------------------------------------------------------- #some example project +#maybe demo #----------------------------------------------------------------- #SUBDIRS += examples/cmdwidget #SUBDIRS += examples/VegeTablesPrice diff --git a/examples/qqtframe2/link_qqt_library.pri b/examples/qqtframe2/link_qqt_library.pri index 2ce45a6c..5b09660a 100644 --- a/examples/qqtframe2/link_qqt_library.pri +++ b/examples/qqtframe2/link_qqt_library.pri @@ -2,11 +2,11 @@ #you can modify this pri to link qqt_library equals(QMAKE_HOST.os, Darwin) { - QQT_SOURCE_ROOT = /Users/abel/Develop/a0-develop/a0-qqtfoundation + QQT_SOURCE_ROOT = $$PWD/../../ } else: equals(QMAKE_HOST.os, Linux) { - QQT_SOURCE_ROOT = /home/abel/Develop/a0-develop/LibQt + QQT_SOURCE_ROOT = $$PWD/../../ } else: equals(QMAKE_HOST.os, Windows) { - QQT_SOURCE_ROOT = C:/Users/Administrator/Develop/a0-develop/LibQt + QQT_SOURCE_ROOT = $$PWD/../../ } #qqt qkit @@ -29,7 +29,7 @@ include($${QQT_SOURCE_ROOT}/src/qqt_header.pri) #qqt library or qqt source #CONFIG += BUILD_SRC contains (CONFIG, BUILD_SRC) { - #if you want to build src but not link QQt in this project + #if you want to build src but not link QQt in your project include($${QQT_SOURCE_ROOT}/src/qqt_source.pri) } else { #QKIT_PRIVATE from qqt_header.pri diff --git a/src/frame/qqtwifidbwidget.h b/src/frame/qqtwifidbwidget.h index 3a2203a2..03e01021 100644 --- a/src/frame/qqtwifidbwidget.h +++ b/src/frame/qqtwifidbwidget.h @@ -3,11 +3,12 @@ #include #include +#include class QQTSHARED_EXPORT QQtWifiDBWidget : public QQtWidget { Q_OBJECT - Q_ENUMS(DB_STAT) + Q_ENUMS ( DB_STAT ) public: enum DB_STAT @@ -21,11 +22,11 @@ public: Db_SMax }; - explicit QQtWifiDBWidget(QWidget* parent = nullptr); + explicit QQtWifiDBWidget ( QWidget* parent = nullptr ); virtual ~QQtWifiDBWidget() {} - void setDB(DB_STAT s); - void setDbPixMap(DB_STAT s, QString pixname); + void setDB ( DB_STAT s ); + void setDbPixMap ( DB_STAT s, QString pixname ); signals: diff --git a/src/qqt_install.pri b/src/qqt_install.pri index da8cc65f..17112627 100644 --- a/src/qqt_install.pri +++ b/src/qqt_install.pri @@ -232,15 +232,15 @@ defineReplace(create_qt_lib_pri){ ################################################ ##QQt install workflow +##used to output sdk, can't support windows and ios ################################################ -#use to output sdk contains(CONFIG, qqt_create_sdk){ MODULE_NAME=QQt module_name = $$lower($${MODULE_NAME}) QQT_BUILD_DIR=$$OUT_PWD/bin #sdk path - QQT_SDK_DIR = $$PWD/../sdk + QQT_SDK_DIR = $$absolute_path($$PWD/../sdk) message(QQt sdk install here:$${QQT_SDK_DIR}) QQT_INC_DIR = include/$${MODULE_NAME} diff --git a/src/qqt_library.pri b/src/qqt_library.pri index 3c524a30..1e006a4e 100644 --- a/src/qqt_library.pri +++ b/src/qqt_library.pri @@ -7,7 +7,7 @@ ##2017年10月29日08:54:28 ################################################ -#TARGET must be equals to pro name ? no, TARGET must place before qqt_library.pri +#TARGET must be equals to pro name ? no, TARGET must be placeed before qqt_library.pri #qmake pro pri is sequential message(Link QQt to $${TARGET} $${QKIT_PRIVATE} \ @@ -20,7 +20,7 @@ contains(CONFIG, link_from_build) { QQT_BUILD_OUT_PWD = QQt/$${QT_VERSION}/$${SYSNAME}/$${BUILD}/src/$${DESTDIR} QQT_LIB_PWD = $${QQT_BUILD_ROOT}/$${QQT_BUILD_OUT_PWD} } else { - QQT_LIB_PWD = $$PWD/../sdk/lib + QQT_LIB_PWD = $$absolute_path($$PWD/../sdk/lib) } message (Link QQt from: $$QQT_LIB_PWD) @@ -69,6 +69,7 @@ equals(QKIT_PRIVATE, macOS) { QMAKE_POST_LINK += cd bin/$${TARGET}.app/Contents/Frameworks/QQt.framework && QMAKE_POST_LINK += $${command} && QMAKE_POST_LINK += cd $${OUT_PWD} && + #Qt Creator create framework but use absolute path to make link #QMAKE_POST_LINK += cp -rf $${QQT_LIB_PWD}/QQt.framework \ # bin/$${TARGET}.app/Contents/Frameworks && QMAKE_POST_LINK += install_name_tool -change QQt.framework/Versions/$${QQT_MAJOR_VERSION}/QQt \