diff --git a/QGobang.pro b/QGobang.pro index efd6dd2..654dc82 100644 --- a/QGobang.pro +++ b/QGobang.pro @@ -4,6 +4,3 @@ SUBDIRS += \ QGobangClient \ QGobangServer \ QGobangTool - -QGobangClient.depends = QGobangTool -QGobangServer.depends = QGobangTool diff --git a/QGobangClient/CUiManager.cpp b/QGobangClient/CUiManager.cpp index da00d13..360d277 100644 --- a/QGobangClient/CUiManager.cpp +++ b/QGobangClient/CUiManager.cpp @@ -30,6 +30,6 @@ Widget *CUiManager::getWidget() CUiManager::CUiManager() { - //记得初始化成nullptr + // 记得初始化成nullptr m_pWidget = nullptr; } diff --git a/QGobangClient/QGobangClient.exe b/QGobangClient/QGobangClient.exe index 5102bbf..71ab84d 100644 Binary files a/QGobangClient/QGobangClient.exe and b/QGobangClient/QGobangClient.exe differ diff --git a/QGobangClient/QGobangClient.pro b/QGobangClient/QGobangClient.pro index 7c718ec..d2e1963 100644 --- a/QGobangClient/QGobangClient.pro +++ b/QGobangClient/QGobangClient.pro @@ -2,6 +2,7 @@ QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +DESTDIR = $$PWD OBJECTS_DIR = $$PWD/../build/$$TARGET/obj MOC_DIR = $$PWD/../build/$$TARGET/moc RCC_DIR = $$PWD/../build/$$TARGET/rcc @@ -22,6 +23,6 @@ HEADERS += \ FORMS += \ Ui\widget.ui -#引用QGobangTool库文件 +# 引用QGobangTool库文件 INCLUDEPATH += ../QGobangTool/include LIBS += -L$$OUT_PWD/../QGobangTool/lib -lQGobangTool diff --git a/QGobangClient/Ui/widget.h b/QGobangClient/Ui/widget.h index 6eb665c..5f9a97d 100644 --- a/QGobangClient/Ui/widget.h +++ b/QGobangClient/Ui/widget.h @@ -10,8 +10,8 @@ #include -//记得加命名空间 添加命名空间后 UI文件也得加 -//你也可以将UI的命名空间声明到外面, 这样就可以不用加命名空间了, 当然不推荐 +// 记得加命名空间 添加命名空间后 UI文件也得加 +// 你也可以将UI的命名空间声明到外面, 这样就可以不用加命名空间了, 当然不推荐 namespace NS_QGobangClient { diff --git a/QGobangClient/main.cpp b/QGobangClient/main.cpp index 1a6c21d..7118ad2 100644 --- a/QGobangClient/main.cpp +++ b/QGobangClient/main.cpp @@ -1,5 +1,7 @@ #include +#include + #include "Ui/widget.h" #include "CUiManager.h" @@ -9,7 +11,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - //单例设计模式下, 引用比较过长, 长远的来看, 利大于弊 + // 单例设计模式下, 引用比较过长, 长远的来看, 利大于弊 Widget *w = CUiManager::getInstance()->getWidget(); w->show(); diff --git a/QGobangServer/CServerManager.h b/QGobangServer/CServerManager.h index 15379bb..0255c14 100644 --- a/QGobangServer/CServerManager.h +++ b/QGobangServer/CServerManager.h @@ -10,6 +10,7 @@ ***************************************************************/ namespace NS_QGobangServer +{ class CServerManager { @@ -24,4 +25,6 @@ private: }; +} + #endif // CSERVERMANAGER_H diff --git a/QGobangServer/QGobangServer.exe b/QGobangServer/QGobangServer.exe new file mode 100644 index 0000000..462d360 Binary files /dev/null and b/QGobangServer/QGobangServer.exe differ diff --git a/QGobangServer/QGobangServer.pro b/QGobangServer/QGobangServer.pro index 7b55c9c..8ef8c3d 100644 --- a/QGobangServer/QGobangServer.pro +++ b/QGobangServer/QGobangServer.pro @@ -12,9 +12,10 @@ SOURCES += \ CServerManager.cpp \ main.cpp -#引用QGobangTool库文件 -INCLUDEPATH += ../QGobangTool/include -LIBS += -L$$OUT_PWD/../QGobangTool/lib -lQGobangTool - HEADERS += \ CServerManager.h + + +# 引用QGobangTool库文件 +INCLUDEPATH += ../QGobangTool/include +LIBS += -L$$OUT_PWD/../QGobangTool/lib -lQGobangTool diff --git a/QGobangServer/main.cpp b/QGobangServer/main.cpp index 3994cd4..470a030 100644 --- a/QGobangServer/main.cpp +++ b/QGobangServer/main.cpp @@ -4,16 +4,5 @@ int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); - // Set up code that uses the Qt event loop here. - // Call a.quit() or a.exit() to quit the application. - // A not very useful example would be including - // #include - // near the top of the file and calling - // QTimer::singleShot(5000, &a, &QCoreApplication::quit); - // which quits the application after 5 seconds. - - // If you do not need a running Qt event loop, remove the call - // to a.exec() or use the Non-Qt Plain C++ Application template. - return a.exec(); } diff --git a/QGobangTool/QGobangTool.pro b/QGobangTool/QGobangTool.pro index c86adc4..02f8f6f 100644 --- a/QGobangTool/QGobangTool.pro +++ b/QGobangTool/QGobangTool.pro @@ -14,8 +14,7 @@ CONFIG += c++17 cmdline CONFIG -= debug_and_release debug_and_release_target SOURCES += \ - QGobangRule.cpp \ - main.cpp + QGobangRule.cpp HEADERS += \ QGobangRule.h diff --git a/QGobangTool/main.cpp b/QGobangTool/main.cpp deleted file mode 100644 index 3994cd4..0000000 --- a/QGobangTool/main.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - QCoreApplication a(argc, argv); - - // Set up code that uses the Qt event loop here. - // Call a.quit() or a.exit() to quit the application. - // A not very useful example would be including - // #include - // near the top of the file and calling - // QTimer::singleShot(5000, &a, &QCoreApplication::quit); - // which quits the application after 5 seconds. - - // If you do not need a running Qt event loop, remove the call - // to a.exec() or use the Non-Qt Plain C++ Application template. - - return a.exec(); -} diff --git a/resource/readme/1.png b/resource/readme/1.png index de1000e..057ba58 100644 Binary files a/resource/readme/1.png and b/resource/readme/1.png differ