diff --git a/.vscode/settings.json b/.vscode/settings.json index 3267c16..20fb3d6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,37 +1,31 @@ { "files.autoSave": "onFocusChange", "editor.fontSize": 14, - // "editor.fontFamily": "'Source Code Pro', 'Source Code Pro', 'Source Code Pro'", - "terminal.integrated.fontFamily": "Source Code Pro", "cmake.configureOnOpen": true, + "editor.fontFamily": "'Maple Mono NL NF CN Light', 'Maple Mono NL NF CN Light', 'Maple Mono NL NF CN Light'", "cmake.debugConfig": { - "console": "integratedTerminal", + "console": "externalTerminal", "setupCommands": [ { - "description": "-gdb-set charset utf-8", - "text": "-gdb-set charset UTF-8" - }, - { - "description": "Enable gdb pretty-printing", + "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ], - "visualizerFile": "${workspaceRoot}/.vscode/qt5.natvis", - "args": ["127.0.0.1", "9009"] + //"visualizerFile": "${workspaceRoot}/.vscode/qt6.natvis", + "args": [] }, - "cmake.configureArgs": [ - "-Wno-dev" - ], "cmake.environment": { - "QT_LIB_ROOT": "C:/Qt/6.8.3", - "PATH": "${env:PATH};C:/Qt/6.8.3/bin" + //"EXTER_LIB_DIR": "C:/local" }, "cmake.configureSettings": { - "CMAKE_PREFIX_PATH": "${env:QT_LIB_ROOT}", - "QT_DEFAULT_MAJOR_VERSION": "6", - "COMPILE_GUI": "ON" + "CMAKE_PREFIX_PATH": "C:/msys64/ucrt64", + //"CMAKE_TOOLCHAIN_FILE": "${env:TT_VCPKG}" }, + "cmake.configureArgs": [ + "-Wno-dev", + "-DCOMPILE_GUI=ON" + ], "cmake.options.statusBarVisibility": "visible", "cmake.generator": "Ninja", "C_Cpp.default.compileCommands": "${workspaceRoot}/build/compile_commands.json", @@ -44,11 +38,11 @@ "zh-hans": true }, "files.associations": { - "iostream": "cpp", - "algorithm": "cpp", + "string": "cpp", "any": "cpp", "array": "cpp", "atomic": "cpp", + "bit": "cpp", "bitset": "cpp", "cctype": "cpp", "charconv": "cpp", @@ -56,9 +50,9 @@ "clocale": "cpp", "cmath": "cpp", "codecvt": "cpp", - "complex": "cpp", + "compare": "cpp", + "concepts": "cpp", "condition_variable": "cpp", - "csignal": "cpp", "cstdarg": "cpp", "cstddef": "cpp", "cstdint": "cpp", @@ -69,53 +63,57 @@ "cwchar": "cpp", "cwctype": "cpp", "deque": "cpp", - "exception": "cpp", - "filesystem": "cpp", "forward_list": "cpp", - "fstream": "cpp", - "functional": "cpp", - "future": "cpp", - "initializer_list": "cpp", - "iomanip": "cpp", - "ios": "cpp", - "iosfwd": "cpp", - "istream": "cpp", - "iterator": "cpp", - "limits": "cpp", "list": "cpp", - "locale": "cpp", "map": "cpp", - "memory": "cpp", - "mutex": "cpp", - "new": "cpp", - "numeric": "cpp", - "optional": "cpp", - "ostream": "cpp", - "queue": "cpp", - "random": "cpp", - "ratio": "cpp", - "regex": "cpp", "set": "cpp", - "shared_mutex": "cpp", - "sstream": "cpp", - "stack": "cpp", - "stdexcept": "cpp", - "streambuf": "cpp", - "string": "cpp", - "string_view": "cpp", - "system_error": "cpp", - "xthread": "cpp", - "thread": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "typeindex": "cpp", - "typeinfo": "cpp", "unordered_map": "cpp", "unordered_set": "cpp", - "utility": "cpp", - "valarray": "cpp", - "variant": "cpp", "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "ratio": "cpp", + "source_location": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "format": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "numbers": "cpp", + "ostream": "cpp", + "queue": "cpp", + "ranges": "cpp", + "semaphore": "cpp", + "shared_mutex": "cpp", + "span": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "stop_token": "cpp", + "streambuf": "cpp", + "text_encoding": "cpp", + "thread": "cpp", + "cfenv": "cpp", + "cinttypes": "cpp", + "typeinfo": "cpp", + "variant": "cpp", + "ios": "cpp", + "locale": "cpp", "xfacet": "cpp", "xhash": "cpp", "xiosbase": "cpp", @@ -127,39 +125,38 @@ "xlocnum": "cpp", "xloctime": "cpp", "xmemory": "cpp", - "xmemory0": "cpp", - "xstddef": "cpp", "xstring": "cpp", "xtr1common": "cpp", - "xtree": "cpp", "xutility": "cpp", - "bit": "cpp", - "compare": "cpp", - "concepts": "cpp", "coroutine": "cpp", - "expected": "cpp", - "memory_resource": "cpp", - "source_location": "cpp", - "format": "cpp", - "numbers": "cpp", - "ranges": "cpp", - "semaphore": "cpp", - "span": "cpp", - "stop_token": "cpp", - "cinttypes": "cpp", + "csignal": "cpp", + "future": "cpp", "stdfloat": "cpp", - "resumable": "cpp", - "qtabwidget": "cpp", - "qtablewidget": "cpp", - "qapplication": "cpp", - "text_encoding": "cpp", - "hash_map": "cpp", - "qreadwritelock": "cpp", - "qdatastream": "cpp", - "qhostaddress": "cpp", - "qthread": "cpp", - "qobject": "cpp", - "qregularexpression": "cpp", - "qstring": "cpp" + "regex": "cpp", + "stack": "cpp", + "valarray": "cpp", + "filesystem": "cpp" + }, + "editor.tokenColorCustomizations": { + "textMateRules": [ + { + "scope": "googletest.failed", + "settings": { + "foreground": "#f00" + } + }, + { + "scope": "googletest.passed", + "settings": { + "foreground": "#0f0" + } + }, + { + "scope": "googletest.run", + "settings": { + "foreground": "#0f0" + } + } + ] } } \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e3c53c..aae870a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ if(DEFINED XP_PLATFORM_SUPPORT) message(STATUS "Support Windows XP platform => ${XP_PLATFORM_SUPPORT}.") add_definitions(-D_WIN32_WINNT=0x0501) else() -add_definitions(-D_WIN32_WINNT=0x0601) +#add_definitions(-D_WIN32_WINNT=0x0601) endif() set(QT_DEP_FILES "${CMAKE_PREFIX_PATH}/bin/Qt${QT_DEFAULT_MAJOR_VERSION}Core.dll" diff --git a/Gui/Control/cpTableWidget.cpp b/Gui/Control/cpTableWidget.cpp index 86b019a..93d7013 100644 --- a/Gui/Control/cpTableWidget.cpp +++ b/Gui/Control/cpTableWidget.cpp @@ -26,7 +26,12 @@ void CpTableWidget::dropEvent(QDropEvent* event) QByteArray encoded = event->mimeData()->data("application/x-qabstractitemmodeldatalist"); QDataStream stream(&encoded, QIODevice::ReadOnly); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QPoint pos = event->position().toPoint(); +#else QPoint pos = event->pos(); +#endif + int startRow = rowAt(pos.y()); int startCol = columnAt(pos.x()); if (startCol != 1 && startCol != 2) { diff --git a/Gui/main.cpp b/Gui/main.cpp index 778e0db..fbba8eb 100644 --- a/Gui/main.cpp +++ b/Gui/main.cpp @@ -18,7 +18,7 @@ int main(int argc, char* argv[]) QFont font("Microsoft YaHei", 9); a.setFont(font); // a.setStyle("fusion"); - a.setStyle("windows"); + // a.setStyle("windows"); #endif qInstallMessageHandler(frelayGUI::ControlMsgHander); diff --git a/Note/version.md b/Note/version.md index 4be87b8..899b78c 100644 --- a/Note/version.md +++ b/Note/version.md @@ -11,6 +11,8 @@ | 序号 | 类型 | 内容 | 说明 | 基于版本 | 完成版本 | | :--: | :--: | ------------------------------------------------------------ | :--: | :------: | :------: | +| 20 | | | | | | +| 19 | 问题 | 客户之间心跳包,被动/主动失联后断开,清除相关内容,终止相关任务。 | | 0.2.2 | | | 18 | 问题 | 断开后重连貌似没有发送心跳包。 | | 0.1 | 0.2 | | 17 | 问题 | 服务端主动踢出的客户端,主动重连假链接,不可用无反应。 | | 0.1 | 0.2 | | 16 | 优化 | 传输完成后接收端要刷新一次。 | | 0.1 | |