diff --git a/QtNovelDesc.pro.user b/QtNovelDesc.pro.user index 873e1c6..8fe42db 100644 --- a/QtNovelDesc.pro.user +++ b/QtNovelDesc.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/TestWidget/TestWidget.pro b/TestWidget/TestWidget.pro index 9cc6dbc..d1e57c9 100644 --- a/TestWidget/TestWidget.pro +++ b/TestWidget/TestWidget.pro @@ -13,6 +13,7 @@ SOURCES += \ widget.cpp HEADERS += \ + tools.h \ widget.h TRANSLATIONS += \ diff --git a/TestWidget/TestWidget.sln b/TestWidget/TestWidget.sln new file mode 100644 index 0000000..b83bcd4 --- /dev/null +++ b/TestWidget/TestWidget.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.33026.149 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWidget", "TestWidget.vcxproj", "{A9990EF2-F9AA-317F-AAB2-ED848703C5E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A9990EF2-F9AA-317F-AAB2-ED848703C5E1}.Debug|x64.ActiveCfg = Debug|x64 + {A9990EF2-F9AA-317F-AAB2-ED848703C5E1}.Debug|x64.Build.0 = Debug|x64 + {A9990EF2-F9AA-317F-AAB2-ED848703C5E1}.Release|x64.ActiveCfg = Release|x64 + {A9990EF2-F9AA-317F-AAB2-ED848703C5E1}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4C2E60F2-FFE2-4D0E-BA13-B408FA3B518C} + EndGlobalSection +EndGlobal diff --git a/TestWidget/TestWidget.vcxproj b/TestWidget/TestWidget.vcxproj new file mode 100644 index 0000000..d5cee00 --- /dev/null +++ b/TestWidget/TestWidget.vcxproj @@ -0,0 +1,236 @@ + + + + + Release + x64 + + + Debug + x64 + + + + {A9990EF2-F9AA-317F-AAB2-ED848703C5E1} + TestWidget + QtVS_v304 + 10.0.22621.0 + 10.0.22621.0 + $(MSBuildProjectDirectory)\QtMsBuild + + + + v141 + release\ + false + NotSet + Application + release\ + TestWidget + + + v141 + debug\ + false + NotSet + Application + debug\ + TestWidget + + + + + + + + + + + + + + + + + + debug\ + debug\ + TestWidget + true + + + release\ + release\ + TestWidget + true + false + + + 5.12.11_msvc2017_64 + core;gui;widgets + + + 5.12.11_msvc2017_64 + core;gui;widgets + + + + + + + GeneratedFiles\$(ConfigurationName);GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories) + -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) + release\ + false + None + 4577;4467;%(DisableSpecificWarnings) + Sync + release\ + MaxSpeed + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_NO_DEBUG;NDEBUG;%(PreprocessorDefinitions) + false + + + MultiThreadedDLL + true + true + Level3 + true + + + shell32.lib;%(AdditionalDependencies) + C:\openssl\lib;C:\Utils\my_sql\mysql-5.6.11-winx64\lib;C:\Utils\postgresql\pgsql\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) + true + false + true + false + $(OutDir)\TestWidget.exe + true + Windows + true + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) + + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + qmake_qmake_qm_files + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + + + + GeneratedFiles\$(ConfigurationName);GeneratedFiles;.;debug;/include;%(AdditionalIncludeDirectories) + -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) + debug\ + false + ProgramDatabase + 4577;4467;%(DisableSpecificWarnings) + Sync + debug\ + Disabled + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + true + true + Level3 + true + + + shell32.lib;%(AdditionalDependencies) + C:\openssl\lib;C:\Utils\my_sql\mysql-5.6.11-winx64\lib;C:\Utils\postgresql\pgsql\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) + true + true + true + $(OutDir)\TestWidget.exe + true + Windows + true + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) + + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + qmake_qmake_qm_files + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + + + + + + + + + + + + + Document + true + $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h + Generate moc_predefs.h + debug\moc_predefs.h;%(Outputs) + + + Document + $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h + Generate moc_predefs.h + release\moc_predefs.h;%(Outputs) + true + + + + + TestWidget_zh_CN.ts;%(AdditionalInputs) + $(QTDIR)\bin\lrelease.exe TestWidget_zh_CN.ts -qm release\TestWidget_zh_CN.qm + lrelease + release\TestWidget_zh_CN.qm;%(Outputs) + TestWidget_zh_CN.ts;%(AdditionalInputs) + $(QTDIR)\bin\lrelease.exe TestWidget_zh_CN.ts -qm debug\TestWidget_zh_CN.qm + lrelease + debug\TestWidget_zh_CN.qm;%(Outputs) + + + + + + + + \ No newline at end of file diff --git a/TestWidget/TestWidget.vcxproj.filters b/TestWidget/TestWidget.vcxproj.filters new file mode 100644 index 0000000..210557e --- /dev/null +++ b/TestWidget/TestWidget.vcxproj.filters @@ -0,0 +1,78 @@ + + + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E} + qrc;* + false + + + {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E} + qrc;* + false + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C} + ts;xlf + false + + + {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C} + ts;xlf + false + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + + + Generated Files + + + Generated Files + + + + + Translation Files + + + \ No newline at end of file diff --git a/TestWidget/TestWidget.vcxproj.user b/TestWidget/TestWidget.vcxproj.user new file mode 100644 index 0000000..65a0eba --- /dev/null +++ b/TestWidget/TestWidget.vcxproj.user @@ -0,0 +1,10 @@ + + + + + 2022-11-28T01:11:57.9884290Z + + + 2022-11-28T01:11:58.0910934Z + + \ No newline at end of file diff --git a/TestWidget/debug/TestWidget.exe b/TestWidget/debug/TestWidget.exe new file mode 100644 index 0000000..ae800fb Binary files /dev/null and b/TestWidget/debug/TestWidget.exe differ diff --git a/TestWidget/debug/TestWidget.ilk b/TestWidget/debug/TestWidget.ilk new file mode 100644 index 0000000..155dad8 Binary files /dev/null and b/TestWidget/debug/TestWidget.ilk differ diff --git a/TestWidget/debug/TestWidget.log b/TestWidget/debug/TestWidget.log new file mode 100644 index 0000000..3fe2534 --- /dev/null +++ b/TestWidget/debug/TestWidget.log @@ -0,0 +1,28 @@ + Moc'ing widget.h... + main.cpp + widget.cpp +d:\projects\cpp\qtnoveldesc\testpad\opstream.h(76): warning C4189: “one”: 局部变量已初始化但不引用 (编译源文件 widget.cpp) + d:\projects\cpp\qtnoveldesc\testpad\opstream.h(73): note: 编译 类 模板 成员函数 "Operate::OpStream::OpStream(std::function)" 时 + with + [ + ValueType=QStandardItem * + ] (编译源文件 widget.cpp) + d:\projects\cpp\qtnoveldesc\testwidget\tools.h(31): note: 参见对正在编译的函数 模板 实例化“Operate::OpStream::OpStream(std::function)”的引用 + with + [ + ValueType=QStandardItem * + ] (编译源文件 widget.cpp) + d:\projects\cpp\qtnoveldesc\testwidget\tools.h(26): note: 参见对正在编译的 类 模板 实例化 "Operate::OpStream" 的引用 (编译源文件 widget.cpp) + d:\projects\cpp\qtnoveldesc\testwidget\tools.h(19): note: 编译 类 模板 成员函数 "void Tools::ModelSyncs::presentSync(std::function (const BaseType &)>)" 时 + with + [ + BaseType=QString + ] (编译源文件 widget.cpp) + d:\projects\cpp\qtnoveldesc\testwidget\widget.cpp(27): note: 参见对正在编译的函数 模板 实例化“void Tools::ModelSyncs::presentSync(std::function (const BaseType &)>)”的引用 + with + [ + BaseType=QString + ] + d:\projects\cpp\qtnoveldesc\testwidget\widget.cpp(17): note: 参见对正在编译的 类 模板 实例化 "Tools::ModelSyncs" 的引用 + moc_widget.cpp + TestWidget.vcxproj -> D:\Projects\Cpp\QtNovelDesc\TestWidget\debug\TestWidget.exe diff --git a/TestWidget/debug/TestWidget.pdb b/TestWidget/debug/TestWidget.pdb new file mode 100644 index 0000000..b3e6959 Binary files /dev/null and b/TestWidget/debug/TestWidget.pdb differ diff --git a/TestWidget/debug/TestWidget.tlog/CL.command.1.tlog b/TestWidget/debug/TestWidget.tlog/CL.command.1.tlog new file mode 100644 index 0000000..05517e2 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/CL.command.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/CL.read.1.tlog b/TestWidget/debug/TestWidget.tlog/CL.read.1.tlog new file mode 100644 index 0000000..9a2eeb9 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/CL.read.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/CL.write.1.tlog b/TestWidget/debug/TestWidget.tlog/CL.write.1.tlog new file mode 100644 index 0000000..6f86915 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/CL.write.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/TestWidget.lastbuildstate b/TestWidget/debug/TestWidget.tlog/TestWidget.lastbuildstate new file mode 100644 index 0000000..bea022d --- /dev/null +++ b/TestWidget/debug/TestWidget.tlog/TestWidget.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.22621.0 +Debug|x64|D:\Projects\Cpp\QtNovelDesc\TestWidget\| diff --git a/TestWidget/debug/TestWidget.tlog/TestWidget.write.1u.tlog b/TestWidget/debug/TestWidget.tlog/TestWidget.write.1u.tlog new file mode 100644 index 0000000..050a69d Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/TestWidget.write.1u.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/custombuild.command.1.tlog b/TestWidget/debug/TestWidget.tlog/custombuild.command.1.tlog new file mode 100644 index 0000000..92c8f36 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/custombuild.command.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/custombuild.read.1.tlog b/TestWidget/debug/TestWidget.tlog/custombuild.read.1.tlog new file mode 100644 index 0000000..5a1a5f3 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/custombuild.read.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/custombuild.write.1.tlog b/TestWidget/debug/TestWidget.tlog/custombuild.write.1.tlog new file mode 100644 index 0000000..b7344c9 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/custombuild.write.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/link.command.1.tlog b/TestWidget/debug/TestWidget.tlog/link.command.1.tlog new file mode 100644 index 0000000..6a22d16 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/link.command.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/link.read.1.tlog b/TestWidget/debug/TestWidget.tlog/link.read.1.tlog new file mode 100644 index 0000000..c66dce1 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/link.read.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/link.write.1.tlog b/TestWidget/debug/TestWidget.tlog/link.write.1.tlog new file mode 100644 index 0000000..9868e66 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/link.write.1.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/moc.read.1u.tlog b/TestWidget/debug/TestWidget.tlog/moc.read.1u.tlog new file mode 100644 index 0000000..4cc8dea Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/moc.read.1u.tlog differ diff --git a/TestWidget/debug/TestWidget.tlog/moc.write.1u.tlog b/TestWidget/debug/TestWidget.tlog/moc.write.1u.tlog new file mode 100644 index 0000000..c5ff076 Binary files /dev/null and b/TestWidget/debug/TestWidget.tlog/moc.write.1u.tlog differ diff --git a/TestWidget/debug/TestWidget_zh_CN.qm b/TestWidget/debug/TestWidget_zh_CN.qm new file mode 100644 index 0000000..be651ee --- /dev/null +++ b/TestWidget/debug/TestWidget_zh_CN.qm @@ -0,0 +1 @@ + +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'widget.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.12.11. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_Widget_t { + QByteArrayData data[1]; + char stringdata0[7]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_Widget_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_Widget_t qt_meta_stringdata_Widget = { + { +QT_MOC_LITERAL(0, 0, 6) // "Widget" + + }, + "Widget" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_Widget[] = { + + // content: + 8, // revision + 0, // classname + 0, 0, // classinfo + 0, 0, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + 0 // eod +}; + +void Widget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + Q_UNUSED(_o); + Q_UNUSED(_id); + Q_UNUSED(_c); + Q_UNUSED(_a); +} + +QT_INIT_METAOBJECT const QMetaObject Widget::staticMetaObject = { { + &QWidget::staticMetaObject, + qt_meta_stringdata_Widget.data, + qt_meta_data_Widget, + qt_static_metacall, + nullptr, + nullptr +} }; + + +const QMetaObject *Widget::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *Widget::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_Widget.stringdata0)) + return static_cast(this); + return QWidget::qt_metacast(_clname); +} + +int Widget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QWidget::qt_metacall(_c, _id, _a); + return _id; +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/TestWidget/debug/moc_widget.obj b/TestWidget/debug/moc_widget.obj new file mode 100644 index 0000000..c5c601b Binary files /dev/null and b/TestWidget/debug/moc_widget.obj differ diff --git a/TestWidget/debug/qmake/qtvars_x64_Debug.props b/TestWidget/debug/qmake/qtvars_x64_Debug.props new file mode 100644 index 0000000..bfaa394 --- /dev/null +++ b/TestWidget/debug/qmake/qtvars_x64_Debug.props @@ -0,0 +1,59 @@ + + +_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB +D:\Projects\Cpp\QtNovelDesc\TestWidget\debug\qmake\temp;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtWidgets;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtGui;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtANGLE;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtCore;D:\Projects\Cpp\QtNovelDesc\TestWidget\debug\qmake\temp;/include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\win32-msvc + +-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus +C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Widgetsd.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Guid.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Cored.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\qtmaind.lib;shell32.lib +"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" + +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/Docs/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/include +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/tests +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/plugins +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/imports +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/qml +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/translations + +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +win32-msvc +win32-msvc +3.1 +5.12.11 +$(Qt_INCLUDEPATH_);Debug + 5.12.11_msvc2017_64 + core;gui;widgets + bin + bin + + + DEFINES=/Project/ItemDefinitionGroup/ClCompile/PreprocessorDefinitions;INCLUDEPATH=/Project/ItemDefinitionGroup/ClCompile/AdditionalIncludeDirectories;STDCPP=/Project/ItemDefinitionGroup/ClCompile/LanguageStandard;CL_OPTIONS=/Project/ItemDefinitionGroup/ClCompile/AdditionalOptions;LIBS=/Project/ItemDefinitionGroup/Link/AdditionalDependencies;LINK_OPTIONS=/Project/ItemDefinitionGroup/Link/AdditionalOptions + + debug + 5.12.11 + 5 + 12 + 11 + + diff --git a/TestWidget/debug/qmake/temp/A9990EF2-F9AA-317F-AAB2-ED848703C5E1.TestWidget.designtime.idx b/TestWidget/debug/qmake/temp/A9990EF2-F9AA-317F-AAB2-ED848703C5E1.TestWidget.designtime.idx new file mode 100644 index 0000000..e0a4840 --- /dev/null +++ b/TestWidget/debug/qmake/temp/A9990EF2-F9AA-317F-AAB2-ED848703C5E1.TestWidget.designtime.idx @@ -0,0 +1 @@ +C:\Users\WS\AppData\Local\Temp\1sd2f2ws.lo5.designtime.props diff --git a/TestWidget/debug/qmake/temp/moc_predefs.h.cbt b/TestWidget/debug/qmake/temp/moc_predefs.h.cbt new file mode 100644 index 0000000..693383c --- /dev/null +++ b/TestWidget/debug/qmake/temp/moc_predefs.h.cbt @@ -0,0 +1 @@ +This is a dummy file needed to create ./moc_predefs.h diff --git a/TestWidget/debug/qmake/temp/props.txt b/TestWidget/debug/qmake/temp/props.txt new file mode 100644 index 0000000..927788a --- /dev/null +++ b/TestWidget/debug/qmake/temp/props.txt @@ -0,0 +1,25 @@ +QT_SYSROOT: +QT_INSTALL_PREFIX:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_INSTALL_ARCHDATA:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_INSTALL_DATA:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_INSTALL_DOCS:C:/Qt/Qt5.12.11/Docs/Qt-5.12.11 +QT_INSTALL_HEADERS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/include +QT_INSTALL_LIBS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +QT_INSTALL_LIBEXECS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +QT_INSTALL_BINS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +QT_INSTALL_TESTS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/tests +QT_INSTALL_PLUGINS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/plugins +QT_INSTALL_IMPORTS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/imports +QT_INSTALL_QML:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/qml +QT_INSTALL_TRANSLATIONS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/translations +QT_INSTALL_CONFIGURATION: +QT_INSTALL_EXAMPLES:C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +QT_INSTALL_DEMOS:C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +QT_HOST_PREFIX:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_HOST_DATA:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_HOST_BINS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +QT_HOST_LIBS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +QMAKE_SPEC:win32-msvc +QMAKE_XSPEC:win32-msvc +QMAKE_VERSION:3.1 +QT_VERSION:5.12.11 diff --git a/TestWidget/debug/qmake/temp/qtvars.log b/TestWidget/debug/qmake/temp/qtvars.log new file mode 100644 index 0000000..e69de29 diff --git a/TestWidget/debug/qmake/temp/qtvars.pro b/TestWidget/debug/qmake/temp/qtvars.pro new file mode 100644 index 0000000..ca4cf11 --- /dev/null +++ b/TestWidget/debug/qmake/temp/qtvars.pro @@ -0,0 +1,2 @@ +CONFIG += no_fixpath +QT += core gui widgets diff --git a/TestWidget/debug/qmake/temp/qtvars.vcxproj b/TestWidget/debug/qmake/temp/qtvars.vcxproj new file mode 100644 index 0000000..b67090f --- /dev/null +++ b/TestWidget/debug/qmake/temp/qtvars.vcxproj @@ -0,0 +1,83 @@ + + + + + Debug + x64 + + + + + qtvars + Qt4VSv1.0 + + + + v141 + .\ + false + NotSet + Application + qtvars + + + + + + + + + .\ + qtvars + true + + + + D:\Projects\Cpp\QtNovelDesc\TestWidget\debug\qmake\temp;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtWidgets;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtGui;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtANGLE;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtCore;D:\Projects\Cpp\QtNovelDesc\TestWidget\debug\qmake\temp;/include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\win32-msvc;%(AdditionalIncludeDirectories) + -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions) + .\ + false + ProgramDatabase + Sync + .\ + Disabled + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + true + true + TurnOffAllWarnings + + + C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Widgetsd.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Guid.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Cored.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\qtmaind.lib;shell32.lib;%(AdditionalDependencies) + C:\openssl\lib;C:\Utils\my_sql\mysql-5.6.11-winx64\lib;C:\Utils\postgresql\pgsql\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) + true + true + true + $(OutDir)\qtvars.exe + true + Windows + true + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) + + + + + Document + C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + cl -BxC:\Qt\Qt5.12.11\5.12.11\msvc2017_64\bin\qmake.exe -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W0 -E C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\features\data\dummy.cpp 2>NUL >moc_predefs.h + Generate moc_predefs.h + moc_predefs.h;%(Outputs) + + + + + \ No newline at end of file diff --git a/TestWidget/debug/qmake/temp/qtvars.vcxproj.filters b/TestWidget/debug/qmake/temp/qtvars.vcxproj.filters new file mode 100644 index 0000000..a5e61b7 --- /dev/null +++ b/TestWidget/debug/qmake/temp/qtvars.vcxproj.filters @@ -0,0 +1,14 @@ + + + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + + + Generated Files + + + \ No newline at end of file diff --git a/TestWidget/debug/qmake/temp/qtvars_x64_Debug.props b/TestWidget/debug/qmake/temp/qtvars_x64_Debug.props new file mode 100644 index 0000000..bfaa394 --- /dev/null +++ b/TestWidget/debug/qmake/temp/qtvars_x64_Debug.props @@ -0,0 +1,59 @@ + + +_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB +D:\Projects\Cpp\QtNovelDesc\TestWidget\debug\qmake\temp;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtWidgets;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtGui;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtANGLE;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtCore;D:\Projects\Cpp\QtNovelDesc\TestWidget\debug\qmake\temp;/include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\win32-msvc + +-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus +C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Widgetsd.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Guid.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Cored.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\qtmaind.lib;shell32.lib +"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" + +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/Docs/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/include +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/tests +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/plugins +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/imports +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/qml +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/translations + +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +win32-msvc +win32-msvc +3.1 +5.12.11 +$(Qt_INCLUDEPATH_);Debug + 5.12.11_msvc2017_64 + core;gui;widgets + bin + bin + + + DEFINES=/Project/ItemDefinitionGroup/ClCompile/PreprocessorDefinitions;INCLUDEPATH=/Project/ItemDefinitionGroup/ClCompile/AdditionalIncludeDirectories;STDCPP=/Project/ItemDefinitionGroup/ClCompile/LanguageStandard;CL_OPTIONS=/Project/ItemDefinitionGroup/ClCompile/AdditionalOptions;LIBS=/Project/ItemDefinitionGroup/Link/AdditionalDependencies;LINK_OPTIONS=/Project/ItemDefinitionGroup/Link/AdditionalOptions + + debug + 5.12.11 + 5 + 12 + 11 + + diff --git a/TestWidget/debug/qmake_qmake_qm_files.qrc b/TestWidget/debug/qmake_qmake_qm_files.qrc new file mode 100644 index 0000000..27a0eb6 --- /dev/null +++ b/TestWidget/debug/qmake_qmake_qm_files.qrc @@ -0,0 +1,5 @@ + + +D:/Projects/Cpp/QtNovelDesc/TestWidget/debug/TestWidget_zh_CN.qm + + diff --git a/TestWidget/debug/qrc_qmake_qmake_qm_files.cpp b/TestWidget/debug/qrc_qmake_qmake_qm_files.cpp new file mode 100644 index 0000000..c52821b --- /dev/null +++ b/TestWidget/debug/qrc_qmake_qmake_qm_files.cpp @@ -0,0 +1,90 @@ +/**************************************************************************** +** Resource object code +** +** Created by: The Resource Compiler for Qt version 5.12.11 +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +static const unsigned char qt_resource_data[] = { + // D:/Projects/Cpp/QtNovelDesc/TestWidget/debug/TestWidget_zh_CN.qm + 0x0,0x0,0x0,0x10, + 0x3c, + 0xb8,0x64,0x18,0xca,0xef,0x9c,0x95,0xcd,0x21,0x1c,0xbf,0x60,0xa1,0xbd,0xdd, + +}; + +static const unsigned char qt_resource_name[] = { + // i18n + 0x0,0x4, + 0x0,0x6,0xc4,0xee, + 0x0,0x69, + 0x0,0x31,0x0,0x38,0x0,0x6e, + // TestWidget_zh_CN.qm + 0x0,0x13, + 0x4,0xa7,0xae,0x5d, + 0x0,0x54, + 0x0,0x65,0x0,0x73,0x0,0x74,0x0,0x57,0x0,0x69,0x0,0x64,0x0,0x67,0x0,0x65,0x0,0x74,0x0,0x5f,0x0,0x7a,0x0,0x68,0x0,0x5f,0x0,0x43,0x0,0x4e,0x0,0x2e, + 0x0,0x71,0x0,0x6d, + +}; + +static const unsigned char qt_resource_struct[] = { + // : + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/i18n + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/i18n/TestWidget_zh_CN.qm + 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, +0x0,0x0,0x1,0x84,0xbb,0xcd,0x97,0xa7, + +}; + +#ifdef QT_NAMESPACE +# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name +# define QT_RCC_MANGLE_NAMESPACE0(x) x +# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b +# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b) +# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \ + QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE)) +#else +# define QT_RCC_PREPEND_NAMESPACE(name) name +# define QT_RCC_MANGLE_NAMESPACE(name) name +#endif + +#ifdef QT_NAMESPACE +namespace QT_NAMESPACE { +#endif + +bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); + +bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); + +#ifdef QT_NAMESPACE +} +#endif + +int QT_RCC_MANGLE_NAMESPACE(qInitResources_qmake_qmake_qm_files)(); +int QT_RCC_MANGLE_NAMESPACE(qInitResources_qmake_qmake_qm_files)() +{ + QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData) + (0x2, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_qmake_qmake_qm_files)(); +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_qmake_qmake_qm_files)() +{ + QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData) + (0x2, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +namespace { + struct initializer { + initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_qmake_qmake_qm_files)(); } + ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_qmake_qmake_qm_files)(); } + } dummy; +} diff --git a/TestWidget/debug/qt.natvis b/TestWidget/debug/qt.natvis new file mode 100644 index 0000000..00575ef --- /dev/null +++ b/TestWidget/debug/qt.natvis @@ -0,0 +1,835 @@ + + + + + + + + {{ x = {xp}, y = {yp} }} + + xp + yp + + + + + {{ x = {x1}, y = {y1}, width = {x2 - x1 + 1}, height = {y2 - y1 + 1} }} + + x1 + y1 + x2 - x1 + 1 + y2 - y1 + 1 + + + + + {{ x = {xp}, y = {yp}, width = {w}, height = {h} }} + + xp + yp + w + h + + + + + + {{ width = {wd}, height = {ht} }} + + wd + ht + + + + + + {{ start point = {pt1}, end point = {pt2} }} + + + {pt1} + + pt1 + + + + {pt2} + + pt2 + + + + + + + + {{ size = {d->size} }} + + d->ref.atomic._q_value + + d->size + (QPoint*)((reinterpret_cast<char*>(d)) + d->offset) + + + + + + {{ size = {d->size} }} + + + d->size > 0 + && ((((QPointF*)((reinterpret_cast<char*>(d)) + d->offset)[0]).xp + == (((QPointF*)((reinterpret_cast<char*>(d)) + d->offset)[d->size - 1]).xp) + && ((((QPointF*)((reinterpret_cast<char*>(d)) + d->offset)[0]).yp + == (((QPointF*)((reinterpret_cast<char*>(d)) + d->offset)[d->size - 1]).yp) + + d->ref.atomic._q_value + + d->size + (QPointF*)((reinterpret_cast<char*>(d)) + d->offset) + + + + + + {{ x = {xp}, y = {yp} }} + + xp + yp + + + + + {{ x = {xp}, y = {yp}, z = {zp} }} + + xp + yp + zp + + + + + {{ x = {xp}, y = {yp}, z = {zp}, w = {wp} }} + + xp + yp + zp + wp + + + + + + {{ m11 = {_m11}, m12 = {_m12}, m21 = {_m21}, m22 = {_m22}, ... }} + + + _m11 + _m12 + _m21 + _m22 + _dx + _dy + + + + + + {{ m11 = {m[0][0]}, m12 = {m[1][0]}, m13 = {m[2][0]}, m14 = {m[3][0]}, ... }} + + + m[0][0] + m[1][0] + m[2][0] + m[3][0] + m[0][1] + m[1][1] + m[2][1] + m[3][1] + m[0][2] + m[1][2] + m[2][2] + m[3][2] + m[0][3] + m[1][3] + m[2][3] + m[3][3] + + + + + + {{ horizontal = {static_cast<Policy>(bits.horPolicy)}, vertical = {static_cast<Policy>(bits.verPolicy)}, type = {ControlType(1 << bits.ctype)} }} + + + + QSizePolicy::Policy::{static_cast<Policy>(bits.verPolicy)} + + + QSizePolicy::Policy::{static_cast<Policy>(bits.horPolicy)} + + + QSizePolicy::ControlType::{ControlType(1 << bits.ctype)} + + + + Qt::Vertical (2) + + + Qt::Horizontal (1) + + + static_cast<int>(bits.verStretch) + static_cast<int>(bits.horStretch) + bits.hfw == 1 + bits.wfh == 1 + + + + + {ucs,c} + ucs,c + + ucs > 0xff ? '\0' : char(ucs),c + ucs,c + + + + + {((reinterpret_cast<unsigned short*>(d)) + d->offset / 2),sub} + ((reinterpret_cast<unsigned short*>(d)) + d->offset / 2),sub + + d->size + d->ref.atomic._q_value + + d->size + ((reinterpret_cast<unsigned short*>(d)) + d->offset / 2),c + + + + + + + {m_string,[m_size]} u"" + {offset() + m_position,[m_size]} + + m_position + m_size + + m_size + offset()+m_position + + + + + + {m_data,[m_size]} + m_data,[m_size] + + m_size + + m_size + m_data + + + + + + {((reinterpret_cast<char*>(d)) + d->offset),sb} + ((reinterpret_cast<char*>(d)) + d->offset),sb + + d->size + d->ref.atomic._q_value + + d->size + ((reinterpret_cast<char*>(d)) + d->offset),c + + + + + + + + + + + + + + + + + + + + {scheme()}://{host()}{path()} + {path()} + + scheme() + username() + password() + host() + path() + query() + fragment() + + + + + {{ size = {(d.d->size << 3) - *((reinterpret_cast<char*>(d.d)) + d.d->offset)} }} + + d.d->ref.atomic._q_value + + (d.d->size << 3) - *((reinterpret_cast<char*>(d.d)) + d.d->offset) + + (*(reinterpret_cast<const unsigned char*>((reinterpret_cast<char*>(d.d)) + d.d->offset) + 1 + + ($i >> 3)) & (1 << ($i & 7))) != 0 + + + + + + + + {{ size = {s} }} + + a + + s + ptr + + + + + + {{ julian day = {jd} }} + + + + + {{ millisecond = {mds} }} + {{ milliseconds = {mds} }} + + mds / 3600000, d + mds / 3600000, d + (mds % 3600000) / 60000, d + (mds % 3600000) / 60000, d + (mds / 1000) % 60, d + (mds / 1000) % 60, d + mds % 1000, d + mds % 1000, d + + + + + {d.pattern} + + + + + ref._q_value + + + + + strong reference to shared pointer of type {"$T1"} + + value == 0 + d->weakref._q_value + d->strongref._q_value + + + + + pointer to implicit shared object of type {"$T1"} + + d + + + + + pointer to explicit shared object of type {"$T1"} + + d + + + + + guarded pointer to subclass of QObject of type {"$T1"} + + wp.d == 0 || wp.d->strongref._q_value == 0 || wp.value == 0 + + + + + weak reference to shared pointer of type {"$T1"} + + d == 0 || d->strongref._q_value == 0 || value == 0 + d->weakref._q_value + d->strongref._q_value + + + + + scoped pointer to a dynamically allocated object of type {"$T1"} + + !d + + + + + scoped pointer to dynamically allocated array of objects of type {"$T1"} + + !d + + + + + ({first}, {second}) + + first + second + + + + + + {{ size = {d->size} }} + + d->ref.atomic._q_value + + d->size + ($T1*)((reinterpret_cast<char*>(d)) + d->offset) + + + + + + + {{ size = {d->end - d->begin} }} + + d->ref.atomic._q_value + + d->end - d->begin + *reinterpret_cast<$T1*>((sizeof($T1) > sizeof(void*)) + ? reinterpret_cast<Node*>(d->array + d->begin + $i)->v + : reinterpret_cast<$T1*>(d->array + d->begin + $i)) + + + + + + + {{ size = {d->end - d->begin} }} + + d->ref.atomic._q_value + + d->end - d->begin + + *reinterpret_cast<QString*>((sizeof(QString) > sizeof(void*)) + ? reinterpret_cast<Node*>(d->array + d->begin + $i)->v + : reinterpret_cast<QString*>(d->array + d->begin + $i)) + + + + + + + {{ size = {d->end - d->begin} }} + + d->ref.atomic._q_value + + d->end - d->begin + + *reinterpret_cast<QVariant*>((sizeof(QVariant) > sizeof(void*)) + ? reinterpret_cast<Node*>(d->array + d->begin + $i)->v + : reinterpret_cast<QVariant*>(d->array + d->begin + $i)) + + + + + + + {{ size = {d->size} }} + + d->ref.atomic._q_value + + d->size + d->n + n + (*(QLinkedListNode<$T1>*)this).t + + + + + + ({key}, {value}) + + key + value + + + + + + {{ size = {d->size} }} + + d->ref.atomic._q_value + + d->size + d->header.left + left + right + *((QMapNode<$T1,$T2>*)this) + + + + + + (empty) + ({key}, {value}) + + key + value + next + + + + + + {{ size = {d->size} }} + + + d->numBuckets + reinterpret_cast<Node **>(d->buckets) + + + + + + + d->size + + + node = *(bucket++) + --n + + + keyValuePair = reinterpret_cast<Node *>(node) + keyValuePair->value + node = node->next + + + + + + + + (empty) + ({key}) + + key + + + + + {{ size = {q_hash.d->size} }} + + q_hash + + + + + ({*keyPtr}, {*t}) + + *keyPtr + *t + + + + + {{ size = {hash.d->size} }} + + mx + total + hash.d->ref.atomic._q_value + + hash.d->size + f + n + *((Node*)this) + + + + + + + + + + + + + + {{ row count = {(*d_ptr.d).rows()}, column count = {(*d_ptr.d).columns()} }} + + d_ptr.d,! + (*d_ptr.d).rows() + (*d_ptr.d).columns() + + + + + + + Invalid + {d.data.b} + {d.data.i} + {d.data.u} + {d.data.ll} + {d.data.ull} + {d.data.d} + {d.data.c} + + {*((QMap<QString,QVariant>*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QList<QVariant>*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QString*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QStringList*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QByteArray*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QBitArray*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QDate*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QTime*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + DateTime + Url + Locale + + {*((QRect*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QRectF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QSize*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QSizeF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QLine*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QLineF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QPoint*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + + {*((QPointF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + RegExp + RegularExpression + + {*((QHash<QString,QVariant>*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr)))} + + EasingCurve + Uuid + ModelIndex + LastCoreType + Font + Pixmap + Brush + Color + Palette + Image + Polygon + Region + Bitmap + Cursor + KeySequence + Pen + TextLength + TextFormat + Matrix + Transform + Matrix4x4 + Vector2D + Vector3D + Vector4D + Quaternion + PolygonF + Icon + LastGuiType + SizePolicy + UserType + LastType + + + + + + d.data.c + + + *((QString*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + + *((QByteArray*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + + + + + + + *((QMap<QString,QVariant>*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QList<QVariant>*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QString*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QStringList*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QByteArray*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QBitArray*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QDate*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QTime*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QRect*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QRectF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QSize*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QSizeF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QLine*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QLineF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QPoint*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QPointF*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + *((QHash<QString,QVariant>*)(d.is_shared ? d.data.shared->ptr + : reinterpret_cast<const void *>(&d.data.ptr))) + + + + + + + diff --git a/TestWidget/debug/qt_work.log b/TestWidget/debug/qt_work.log new file mode 100644 index 0000000..5be0105 Binary files /dev/null and b/TestWidget/debug/qt_work.log differ diff --git a/TestWidget/debug/vc141.pdb b/TestWidget/debug/vc141.pdb new file mode 100644 index 0000000..b01e3a5 Binary files /dev/null and b/TestWidget/debug/vc141.pdb differ diff --git a/TestWidget/debug/widget.obj b/TestWidget/debug/widget.obj new file mode 100644 index 0000000..30010c8 Binary files /dev/null and b/TestWidget/debug/widget.obj differ diff --git a/TestWidget/release/moc_predefs.h.cbt b/TestWidget/release/moc_predefs.h.cbt new file mode 100644 index 0000000..92a8741 --- /dev/null +++ b/TestWidget/release/moc_predefs.h.cbt @@ -0,0 +1 @@ +This is a dummy file needed to create release/moc_predefs.h diff --git a/TestWidget/release/qmake/qtvars_x64_Release.props b/TestWidget/release/qmake/qtvars_x64_Release.props new file mode 100644 index 0000000..451dee9 --- /dev/null +++ b/TestWidget/release/qmake/qtvars_x64_Release.props @@ -0,0 +1,59 @@ + + +_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG +D:\Projects\Cpp\QtNovelDesc\TestWidget\release\qmake\temp;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtWidgets;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtGui;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtANGLE;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtCore;D:\Projects\Cpp\QtNovelDesc\TestWidget\release\qmake\temp;/include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\win32-msvc + +-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus +C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Widgets.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Gui.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Core.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\qtmain.lib;shell32.lib +"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" + +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/Docs/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/include +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/tests +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/plugins +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/imports +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/qml +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/translations + +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +win32-msvc +win32-msvc +3.1 +5.12.11 +$(Qt_INCLUDEPATH_);Release + 5.12.11_msvc2017_64 + core;gui;widgets + bin + bin + + + DEFINES=/Project/ItemDefinitionGroup/ClCompile/PreprocessorDefinitions;INCLUDEPATH=/Project/ItemDefinitionGroup/ClCompile/AdditionalIncludeDirectories;STDCPP=/Project/ItemDefinitionGroup/ClCompile/LanguageStandard;CL_OPTIONS=/Project/ItemDefinitionGroup/ClCompile/AdditionalOptions;LIBS=/Project/ItemDefinitionGroup/Link/AdditionalDependencies;LINK_OPTIONS=/Project/ItemDefinitionGroup/Link/AdditionalOptions + + release + 5.12.11 + 5 + 12 + 11 + + diff --git a/TestWidget/release/qmake/temp/A9990EF2-F9AA-317F-AAB2-ED848703C5E1.TestWidget.designtime.idx b/TestWidget/release/qmake/temp/A9990EF2-F9AA-317F-AAB2-ED848703C5E1.TestWidget.designtime.idx new file mode 100644 index 0000000..3c5785c --- /dev/null +++ b/TestWidget/release/qmake/temp/A9990EF2-F9AA-317F-AAB2-ED848703C5E1.TestWidget.designtime.idx @@ -0,0 +1 @@ +C:\Users\WS\AppData\Local\Temp\dztjsegl.olu.designtime.props diff --git a/TestWidget/release/qmake/temp/moc_predefs.h.cbt b/TestWidget/release/qmake/temp/moc_predefs.h.cbt new file mode 100644 index 0000000..693383c --- /dev/null +++ b/TestWidget/release/qmake/temp/moc_predefs.h.cbt @@ -0,0 +1 @@ +This is a dummy file needed to create ./moc_predefs.h diff --git a/TestWidget/release/qmake/temp/props.txt b/TestWidget/release/qmake/temp/props.txt new file mode 100644 index 0000000..927788a --- /dev/null +++ b/TestWidget/release/qmake/temp/props.txt @@ -0,0 +1,25 @@ +QT_SYSROOT: +QT_INSTALL_PREFIX:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_INSTALL_ARCHDATA:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_INSTALL_DATA:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_INSTALL_DOCS:C:/Qt/Qt5.12.11/Docs/Qt-5.12.11 +QT_INSTALL_HEADERS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/include +QT_INSTALL_LIBS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +QT_INSTALL_LIBEXECS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +QT_INSTALL_BINS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +QT_INSTALL_TESTS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/tests +QT_INSTALL_PLUGINS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/plugins +QT_INSTALL_IMPORTS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/imports +QT_INSTALL_QML:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/qml +QT_INSTALL_TRANSLATIONS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/translations +QT_INSTALL_CONFIGURATION: +QT_INSTALL_EXAMPLES:C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +QT_INSTALL_DEMOS:C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +QT_HOST_PREFIX:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_HOST_DATA:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +QT_HOST_BINS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +QT_HOST_LIBS:C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +QMAKE_SPEC:win32-msvc +QMAKE_XSPEC:win32-msvc +QMAKE_VERSION:3.1 +QT_VERSION:5.12.11 diff --git a/TestWidget/release/qmake/temp/qtvars.log b/TestWidget/release/qmake/temp/qtvars.log new file mode 100644 index 0000000..e69de29 diff --git a/TestWidget/release/qmake/temp/qtvars.pro b/TestWidget/release/qmake/temp/qtvars.pro new file mode 100644 index 0000000..ca4cf11 --- /dev/null +++ b/TestWidget/release/qmake/temp/qtvars.pro @@ -0,0 +1,2 @@ +CONFIG += no_fixpath +QT += core gui widgets diff --git a/TestWidget/release/qmake/temp/qtvars.vcxproj b/TestWidget/release/qmake/temp/qtvars.vcxproj new file mode 100644 index 0000000..19af2bd --- /dev/null +++ b/TestWidget/release/qmake/temp/qtvars.vcxproj @@ -0,0 +1,86 @@ + + + + + Release + x64 + + + + + qtvars + Qt4VSv1.0 + + + + v141 + .\ + false + NotSet + Application + qtvars + + + + + + + + + .\ + qtvars + true + false + + + + D:\Projects\Cpp\QtNovelDesc\TestWidget\release\qmake\temp;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtWidgets;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtGui;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtANGLE;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtCore;D:\Projects\Cpp\QtNovelDesc\TestWidget\release\qmake\temp;/include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\win32-msvc;%(AdditionalIncludeDirectories) + -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus %(AdditionalOptions) + .\ + false + None + Sync + .\ + MaxSpeed + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;%(PreprocessorDefinitions) + false + + MultiThreadedDLL + true + true + TurnOffAllWarnings + + + C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Widgets.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Gui.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Core.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\qtmain.lib;shell32.lib;%(AdditionalDependencies) + C:\openssl\lib;C:\Utils\my_sql\mysql-5.6.11-winx64\lib;C:\Utils\postgresql\pgsql\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) + true + false + true + false + $(OutDir)\qtvars.exe + true + Windows + true + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) + + + + + Document + C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + cl -BxC:\Qt\Qt5.12.11\5.12.11\msvc2017_64\bin\qmake.exe -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -E C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\features\data\dummy.cpp 2>NUL >moc_predefs.h + Generate moc_predefs.h + moc_predefs.h;%(Outputs) + + + + + \ No newline at end of file diff --git a/TestWidget/release/qmake/temp/qtvars.vcxproj.filters b/TestWidget/release/qmake/temp/qtvars.vcxproj.filters new file mode 100644 index 0000000..a5e61b7 --- /dev/null +++ b/TestWidget/release/qmake/temp/qtvars.vcxproj.filters @@ -0,0 +1,14 @@ + + + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + + + Generated Files + + + \ No newline at end of file diff --git a/TestWidget/release/qmake/temp/qtvars_x64_Release.props b/TestWidget/release/qmake/temp/qtvars_x64_Release.props new file mode 100644 index 0000000..451dee9 --- /dev/null +++ b/TestWidget/release/qmake/temp/qtvars_x64_Release.props @@ -0,0 +1,59 @@ + + +_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG +D:\Projects\Cpp\QtNovelDesc\TestWidget\release\qmake\temp;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtWidgets;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtGui;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtANGLE;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\include\QtCore;D:\Projects\Cpp\QtNovelDesc\TestWidget\release\qmake\temp;/include;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\mkspecs\win32-msvc + +-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus +C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Widgets.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Gui.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\Qt5Core.lib;C:\Qt\Qt5.12.11\5.12.11\msvc2017_64\lib\qtmain.lib;shell32.lib +"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" + +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/Docs/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/include +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/tests +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/plugins +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/imports +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/qml +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/translations + +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/Examples/Qt-5.12.11 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64 +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/bin +C:/Qt/Qt5.12.11/5.12.11/msvc2017_64/lib +win32-msvc +win32-msvc +3.1 +5.12.11 +$(Qt_INCLUDEPATH_);Release + 5.12.11_msvc2017_64 + core;gui;widgets + bin + bin + + + DEFINES=/Project/ItemDefinitionGroup/ClCompile/PreprocessorDefinitions;INCLUDEPATH=/Project/ItemDefinitionGroup/ClCompile/AdditionalIncludeDirectories;STDCPP=/Project/ItemDefinitionGroup/ClCompile/LanguageStandard;CL_OPTIONS=/Project/ItemDefinitionGroup/ClCompile/AdditionalOptions;LIBS=/Project/ItemDefinitionGroup/Link/AdditionalDependencies;LINK_OPTIONS=/Project/ItemDefinitionGroup/Link/AdditionalOptions + + release + 5.12.11 + 5 + 12 + 11 + + diff --git a/TestWidget/release/qmake_qmake_qm_files.qrc b/TestWidget/release/qmake_qmake_qm_files.qrc new file mode 100644 index 0000000..36a2cad --- /dev/null +++ b/TestWidget/release/qmake_qmake_qm_files.qrc @@ -0,0 +1,5 @@ + + +D:/Projects/Cpp/QtNovelDesc/TestWidget/release/TestWidget_zh_CN.qm + + diff --git a/TestWidget/tools.h b/TestWidget/tools.h new file mode 100644 index 0000000..fbf0fe7 --- /dev/null +++ b/TestWidget/tools.h @@ -0,0 +1,91 @@ +#ifndef COMNTOOLS_H +#define COMNTOOLS_H + +#include "../Testpad/opstream.h" +#include +#include + +namespace Tools { + + template + class ModelSyncs + { + public: + ModelSyncs(QStandardItemModel *model_base, std::function _equal, + std::function sync_proc) + : model_present(model_base), sync_process(sync_proc), compare_process(_equal){} + + void presentSync(std::function(const BaseType &pnode)> items_peak) + { + auto default_pdata = BaseType(); + auto datas = items_peak(default_pdata); + + Operate::OpStream([this](int &cnt, int idx)->QStandardItem*{ + cnt = model_present->rowCount(); + return model_present->item(idx); + }).filter([&datas, this](QStandardItem *const &it)->bool{ + for(auto &d : datas) + if(compare_process(d, it)) + return false; + return true; + }).forEach([this](QStandardItem *const &it){ + model_present->removeRow(it->row()); + }); + + for (auto idx = 0; idx < datas.size(); ++idx) { + if (idx >= model_present->rowCount()) { + auto ins = new QStandardItem(); + ins->setEditable(false); + model_present->appendRow(ins); + } + + auto &data = datas[idx]; + auto item = model_present->item(idx); + sync_process(data, item); + + layer_items_sync(data, item, items_peak); + } + } + + + + private: + QStandardItemModel *model_present; + std::function sync_process; + std::function compare_process; + + void layer_items_sync(const BaseType &data, QStandardItem *pnode, + std::function(const BaseType &pnode)> items_peak){ + auto datas = items_peak(data); + + Operate::OpStream([pnode](int &cnt, int idx)->QStandardItem*{ + cnt = pnode->rowCount(); + return pnode->child(idx); + }).filter([&datas, this](QStandardItem *const &it)->bool{ + for(auto &d : datas) + if(compare_process(d, it)) + return false; + return true; + }).forEach([pnode](QStandardItem *const &it){ + pnode->removeRow(it->row()); + }); + + for (auto idx = 0; idx < datas.size(); ++idx) { + if (idx >= pnode->rowCount()) { + auto ins = new QStandardItem(); + ins->setEditable(false); + pnode->appendRow(ins); + } + + auto &data = datas[idx]; + auto item = pnode->child(idx); + sync_process(data, item); + + layer_items_sync(data, item, items_peak); + } + } + }; +} + + +#endif // COMNTOOLS_H diff --git a/TestWidget/widget.cpp b/TestWidget/widget.cpp index 7350ff4..1154644 100644 --- a/TestWidget/widget.cpp +++ b/TestWidget/widget.cpp @@ -1,8 +1,36 @@ #include "widget.h" +#include "tools.h" + +#include +#include +#include Widget::Widget(QWidget *parent) - : QWidget(parent) + : QWidget(parent), model(new QStandardItemModel(this)) { + auto layout = new QVBoxLayout(this); + auto widget = new QTreeView(this); + layout->addWidget(widget); + widget->setModel(model); + + + Tools::ModelSyncs* xmodel = new Tools::ModelSyncs(model, + [](const QString &d, QStandardItem *n){return d == n->text();}, + [](const QString &d, QStandardItem *i){i->setText(d);}); + + model->appendRow(new QStandardItem("sldkjflkdf")); + + auto button = new QPushButton("click"); + layout->addWidget(button); + + connect(button, &QPushButton::clicked, [this, xmodel](){ + xmodel->presentSync([](const QString &x){ + if(x.length() > 3) + return QList(); + + return QList() << x + "a" << x + "b" << x + "c" << x + "d"; + }); + }); } Widget::~Widget() diff --git a/TestWidget/widget.h b/TestWidget/widget.h index 47b6270..4a6b5b3 100644 --- a/TestWidget/widget.h +++ b/TestWidget/widget.h @@ -1,6 +1,7 @@ #ifndef WIDGET_H #define WIDGET_H +#include #include class Widget : public QWidget @@ -10,5 +11,8 @@ class Widget : public QWidget public: Widget(QWidget *parent = nullptr); ~Widget(); + +private: + QStandardItemModel *const model; }; #endif // WIDGET_H diff --git a/Testpad/Testpad.pro b/Testpad/Testpad.pro index e20b982..a8d0771 100644 --- a/Testpad/Testpad.pro +++ b/Testpad/Testpad.pro @@ -9,7 +9,8 @@ CONFIG -= app_bundle #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ - main.cpp + main.cpp \ + opstream.cpp # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin @@ -36,3 +37,6 @@ else:unix: LIBS += -L$$OUT_PWD/../libProjectManager/ -llibProjectManager INCLUDEPATH += $$PWD/../libProjectManager DEPENDPATH += $$PWD/../libProjectManager + +HEADERS += \ + opstream.h diff --git a/Testpad/main.cpp b/Testpad/main.cpp index 6fddae1..9df7911 100644 --- a/Testpad/main.cpp +++ b/Testpad/main.cpp @@ -2,15 +2,22 @@ #include #include #include +#include + +#include "opstream.h" int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); - QRegExp exp("([^\\.]+)"); - qDebug() << exp.indexIn("packagea.packageb.packagec.packaged"); - qDebug() << exp.capturedTexts(); + QList list; + list << "a" << "b" << "c" << "d"; + + + qDebug() << Operate::OpStream(list) + .filter([](const QString &it){ return it > QString("b"); }) + .select([](const QString n)->QString{ return n + "xx"; }).toList(); return a.exec(); diff --git a/Testpad/opstream.cpp b/Testpad/opstream.cpp new file mode 100644 index 0000000..296cc8d --- /dev/null +++ b/Testpad/opstream.cpp @@ -0,0 +1,2 @@ +#include "opstream.h" + diff --git a/Testpad/opstream.h b/Testpad/opstream.h new file mode 100644 index 0000000..5b9f9eb --- /dev/null +++ b/Testpad/opstream.h @@ -0,0 +1,104 @@ +#ifndef OPSTREAM_H +#define OPSTREAM_H + +#include +#include + +namespace Operate { + + template + class Result + { + public: + Result(QList source, std::function list_filter, std::function list_peaks) + : source_store(source), peak_store(list_peaks), filter_store(list_filter){} + virtual ~Result() = default; + + virtual QList toList() + { + QList rets_list; + + for(auto &it : source_store) + if(filter_store(it)) + rets_list << peak_store(it); + + return rets_list; + } + + template + QHash toMap(std::function key_selector) + { + QHash map; + + for(auto &it : source_store) + if(filter_store(it)) + map[key_selector(it)] = peak_store(it); + + return map; + } + + virtual void forEach(std::function ex_proc) + { + auto items = toList(); + for(auto &it : items) + ex_proc(it); + } + + Result filter(std::function filter){ + auto filter_combine = [filter, this](const ValueType& it){ return filter(it) && filter_store(it); }; + return Result(source_store, filter_combine, peak_store); + } + + template + Result select(std::function peak){ + auto peak_combine = [peak, this](const TargetType &it){ + auto temp = this->peak_store(it); + return peak(temp); + }; + return Result(source_store, filter_store, peak_combine); + } + + + private: + QList source_store; + std::function peak_store; + std::function filter_store; + }; + + + template + class OpStream + { + public: + OpStream(std::function peak_proc) + { + int count = 0, index = 0; + ValueType one = peak_proc(count, index); + for(; index < count; ++index) + source_store << peak_proc(count, index); + } + OpStream(QList source) + : source_store(source){} + + template + Result select(std::function value_selector) + { + return Result(source_store, [](const ValueType& it){return true;}, value_selector); + } + Result select() + { + return Result(source_store, [](const ValueType& it){return true;}, [](const ValueType& it){return it;}); + } + + Result filter(std::function filter) + { + return Result(source_store, filter, [](const ValueType& it){ return it; }); + } + + private: + QList source_store; + }; + +} + +#endif // OPSTREAM_H diff --git a/WordsIDE/SensitiveCore.cpp b/WordsIDE/SensitiveCore.cpp index 19a98e9..c23edea 100644 --- a/WordsIDE/SensitiveCore.cpp +++ b/WordsIDE/SensitiveCore.cpp @@ -2,6 +2,7 @@ #include #include +#include using namespace MakeTools; @@ -106,15 +107,15 @@ void SensitiveCore::recompile(const QString &file_path, const QString &doc_name) VariedTextView::VariedTextView() : QObject(nullptr){} -void VariedTextView::setSource(Core::AppCore *core, const QFileInfo &src, const QString &name, QWidget *parent) +void VariedTextView::initSource(Core::AppCore *core, const QFileInfo &src, const QString &name, QWidget *parent) { this->doc_name = name; - this->setSource(core, src, parent); + this->initSource(core, src, parent); } QString VariedTextView::filePath() const { - return source_x.absoluteFilePath(); + return source_x; } void VariedTextView::save() const @@ -135,9 +136,9 @@ QString VariedTextView::docName() const return doc_name; } -void VariedTextView::setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) +void VariedTextView::initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) { - this->source_x = src; + this->source_x = src.absoluteFilePath(); if(parent) this->setParent(parent); } diff --git a/WordsIDE/SensitiveCore.h b/WordsIDE/SensitiveCore.h index 54ec5fd..4086cf3 100644 --- a/WordsIDE/SensitiveCore.h +++ b/WordsIDE/SensitiveCore.h @@ -18,7 +18,7 @@ namespace MakeTools { explicit VariedTextView(); virtual ~VariedTextView() = default; - void setSource(Core::AppCore *core, const QFileInfo &src, const QString &name, QWidget *parent=nullptr); + void initSource(Core::AppCore *core, const QFileInfo &src, const QString &name, QWidget *parent=nullptr); QString filePath() const; void save() const; @@ -34,10 +34,10 @@ namespace MakeTools { void dataChanged(const QString &filePath); protected: - virtual void setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr); + virtual void initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr); private: - QFileInfo source_x; + QString source_x; QString doc_name; }; diff --git a/WordsIDE/SourceEditView.cpp b/WordsIDE/SourceEditView.cpp index 8bcaf06..a28bc01 100644 --- a/WordsIDE/SourceEditView.cpp +++ b/WordsIDE/SourceEditView.cpp @@ -46,7 +46,7 @@ void TextContentEdit::jumpTo(const QList &path) } -void TextContentEdit::reload(QList configs) +void TextContentEdit::reloadConfigrations(QList configs) { // TODO: 设置格式 auto font_family = Config::ConfigHelper::getConfigAsDefaultSequence diff --git a/WordsIDE/SourceEditView.h b/WordsIDE/SourceEditView.h index 1eec32f..06da755 100644 --- a/WordsIDE/SourceEditView.h +++ b/WordsIDE/SourceEditView.h @@ -65,7 +65,7 @@ namespace Components { // Plugin interface public: virtual Core::FileExtensionFactory *factory() const override; - virtual void reload(QList configs) override; + virtual void reloadConfigrations(QList configs) override; // ModeView interface public: diff --git a/WordsIDE/WordsIDE.pro b/WordsIDE/WordsIDE.pro index 1cc8989..6d3cd60 100644 --- a/WordsIDE/WordsIDE.pro +++ b/WordsIDE/WordsIDE.pro @@ -13,7 +13,6 @@ SOURCES += \ SensitiveCore.cpp \ SourceEditView.cpp \ appcore.cpp \ - conceptview.cpp \ keywordshightlighter.cpp \ main.cpp \ mainwindow.cpp \ @@ -24,28 +23,32 @@ SOURCES += \ storyboardspresent.cpp \ storychainsourceeditor.cpp \ storychainspresent.cpp \ + storyconceptspresent.cpp \ storyunitsourceedit.cpp \ storyunitspresent.cpp \ - storyvolumesourceedit.cpp + storyvolumesourceedit.cpp \ + tools.cpp HEADERS += \ ContentPresent.h \ SensitiveCore.h \ SourceEditView.h \ appcore.h \ - conceptview.h \ keywordshightlighter.h \ mainwindow.h \ messagepresent.h \ + opstream.h \ projectview.h \ sourcecodeeditor.h \ storyboardsourceedit.h \ storyboardspresent.h \ storychainsourceeditor.h \ storychainspresent.h \ + storyconceptspresent.h \ storyunitsourceedit.h \ storyunitspresent.h \ - storyvolumesourceedit.h + storyvolumesourceedit.h \ + tools.h TRANSLATIONS += \ WordsIDE_zh_CN.ts diff --git a/WordsIDE/appcore.cpp b/WordsIDE/appcore.cpp index 76c185d..3d41420 100644 --- a/WordsIDE/appcore.cpp +++ b/WordsIDE/appcore.cpp @@ -19,7 +19,7 @@ using namespace Parse::Result; using namespace MakeTools; AppCore::AppCore(MainWindow *win, QObject *parent) - : QObject(parent), views(win), + : QObject(parent), views_holder(win), global_config(new Config::XMLConfig(this)), parse_core(new ParseCore()), make_tool(new StoryTool(parse_core)), @@ -106,30 +106,30 @@ void AppCore::openTextDocument(const QString &src, const QString &name) if(framework->contains(src)){ auto ins = framework->queryTextComponent(QFileInfo(src)); - dynamic_cast(ins)->resetProcsType(QFileInfo(src).suffix()); - dynamic_cast(ins)->reload(this->getConfigs(xfactorys[0]->configs())); - views->contentViewAppend(ins->textView(), name); + dynamic_cast(ins)->reloadConfigrations(this->getConfigs(xfactorys[0]->configs())); + views_holder->contentViewAppend(ins->textView(), name); return; } - VariedTextView *tview = dynamic_cast(xfactorys[0]->newInstance(this)); - dynamic_cast(tview)->resetProcsType(QFileInfo(src).suffix()); - dynamic_cast(tview)->reload(this->getConfigs(xfactorys[0]->configs())); - this->make_tool->compile(QFileInfo(src), name); - tview->setSource(this, QFileInfo(src), name, views); + + VariedTextView *tview = dynamic_cast(xfactorys[0]->newInstance(this)); + tview->initSource(this, QFileInfo(src), name, views_holder); framework->addPerceptionList(tview); + dynamic_cast(tview)->resetProcsType(QFileInfo(src).suffix()); + dynamic_cast(tview)->reloadConfigrations(this->getConfigs(xfactorys[0]->configs())); + QFile fin(src); if(!fin.open(QIODevice::ReadOnly | QIODevice::Text)){ - QMessageBox::critical(views, "系统错误", QString("无法打开指定文件:%1(%2)").arg(name, src)); + QMessageBox::critical(views_holder, "系统错误", QString("无法打开指定文件:%1(%2)").arg(name, src)); return; } QTextStream tin(&fin); tview->textContentReset(tin.readAll()); - views->contentViewAppend(tview->textView(), name); + views_holder->contentViewAppend(tview->textView(), name); } diff --git a/WordsIDE/appcore.h b/WordsIDE/appcore.h index f7d606e..e0295df 100644 --- a/WordsIDE/appcore.h +++ b/WordsIDE/appcore.h @@ -83,7 +83,7 @@ namespace Core { * @brief 载入指定的配置端口实例 * @param configs */ - virtual void reload(QList configs) = 0; + virtual void reloadConfigrations(QList configs) = 0; }; @@ -129,7 +129,7 @@ namespace Core { void openTextDocument(const QString &src, const QString &name); private: - MainWindow *const views; + MainWindow *const views_holder; Config::Configration *const global_config; Project::ProjectManager * current_project; QList extensions_list; diff --git a/WordsIDE/keywordshightlighter.cpp b/WordsIDE/keywordshightlighter.cpp index 1005141..1739eb2 100644 --- a/WordsIDE/keywordshightlighter.cpp +++ b/WordsIDE/keywordshightlighter.cpp @@ -35,6 +35,9 @@ void KeywordsHightlighter::highlightBlock(const QString &text) QList xerrors; if(w->host() == parse_core->unknowns()){ + unknowns.setUnderlineStyle(QTextCharFormat::UnderlineStyle::WaveUnderline); + unknowns.setUnderlineColor(QColor(Qt::red)); + setFormat(w->column()-1, w->toString().length(), unknowns); } else if(!w->host()->check(xerrors)){ diff --git a/WordsIDE/mainwindow.cpp b/WordsIDE/mainwindow.cpp index 3a1788b..33fa5ec 100644 --- a/WordsIDE/mainwindow.cpp +++ b/WordsIDE/mainwindow.cpp @@ -44,7 +44,7 @@ MainWindow::MainWindow(QWidget *parent) units_view(new StoryUnitsPresent(app_core, this)), errors_present(new MessagePresent(app_core->getMake_tool(), this)), boards_view(new StoryBoardsPresent(app_core, this)), - concept_view(new ConceptView(app_core, this)) + concept_view(new StoryConceptsPresent(app_core, this)) { QApplication::instance()->installEventFilter(this); this->app_core->setCurrentProject(project_manager); @@ -343,6 +343,17 @@ MainWindow::MainWindow(QWidget *parent) app_core->getFramework()->closeTextComponent(QFileInfo(comp->filePath())); }); + connect(project_structure, &ProjectView::aboutToBoDelete, + [this](QList infos){ + for(auto &key : infos){ + auto comp = app_core->getFramework()->queryTextComponent(key); + if(comp){ + toggle_widget_visible(false, center_funcs, comp->textView()); + app_core->getFramework()->closeTextComponent(key); + } + } + }); + this->app_core->getFramework()->addProcTrigger([this](){ this->chains_view->refresh(); this->units_view->refresh(); @@ -376,12 +387,11 @@ void MainWindow::contentViewAppend(QWidget *widget, const QString &name) for(auto idx=0; idxcount(); ++idx){ if(center_funcs->widget(idx) == widget){ center_funcs->setCurrentWidget(widget); - } - else { - center_funcs->addTab(widget, name); - center_funcs->setCurrentWidget(widget); + return; } } + center_funcs->addTab(widget, name); + center_funcs->setCurrentWidget(widget); } void MainWindow::build_internal(bool all_from_disk) @@ -419,8 +429,8 @@ void MainWindow::build_internal(bool all_from_disk) void MainWindow::toggle_widget_visible(bool visible, QTabWidget *con, QWidget *target, const QString &title) { if(visible && con->indexOf(target) == -1){ - con->addTab(target, title); target->setVisible(true); + con->addTab(target, title); }else if(!visible && con->indexOf(target) != -1){ target->setVisible(false); con->removeTab(con->indexOf(target)); @@ -449,10 +459,10 @@ void MainWindow::uilayout_save() xvisible_save(left_funcs, "area-left"); xvisible_save(right_funcs, "area-right"); xvisible_save(bottom_funcs, "area-bottom"); -// xvisible_save(project_structure, "project_tree"); -// xvisible_save(errors_present, "message-view"); -// xvisible_save(chains_view, "chains-sum"); -// xvisible_save(units_view, "units-sum"); + // xvisible_save(project_structure, "project_tree"); + // xvisible_save(errors_present, "message-view"); + // xvisible_save(chains_view, "chains-sum"); + // xvisible_save(units_view, "units-sum"); } void MainWindow::uilayout_load() @@ -467,10 +477,10 @@ void MainWindow::uilayout_load() xvisible_load(left_funcs, "area-left"); xvisible_load(right_funcs, "area-right"); xvisible_load(bottom_funcs, "area-bottom"); -// xvisible_load(project_structure, "project_tree"); -// xvisible_load(errors_present, "message-view"); -// xvisible_load(chains_view, "chains-sum"); -// xvisible_load(units_view, "units-sum"); + // xvisible_load(project_structure, "project_tree"); + // xvisible_load(errors_present, "message-view"); + // xvisible_load(chains_view, "chains-sum"); + // xvisible_load(units_view, "units-sum"); auto convert = [](QStringList in)->QList{ QList size; @@ -503,16 +513,16 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event) { auto ev = event->type(); switch(ev){ - case QEvent::Type::MouseButtonPress: - case QEvent::Type::MouseButtonRelease: - case QEvent::Type::Wheel: - case QEvent::Type::MouseMove: - case QEvent::Type::KeyPress: - case QEvent::Type::KeyRelease: - sync_kernel->sync(); - break; - default: - break; + case QEvent::Type::MouseButtonPress: + case QEvent::Type::MouseButtonRelease: + case QEvent::Type::Wheel: + case QEvent::Type::MouseMove: + case QEvent::Type::KeyPress: + case QEvent::Type::KeyRelease: + sync_kernel->sync(); + break; + default: + break; } return QMainWindow::eventFilter(watched, event); } diff --git a/WordsIDE/mainwindow.h b/WordsIDE/mainwindow.h index d5e250e..7b66d88 100644 --- a/WordsIDE/mainwindow.h +++ b/WordsIDE/mainwindow.h @@ -15,7 +15,7 @@ #include "projectview.h" #include "ContentPresent.h" #include "storyboardspresent.h" -#include "conceptview.h" +#include "storyconceptspresent.h" class Run @@ -80,7 +80,7 @@ private: Components::StoryUnitsPresent *const units_view; Components::MessagePresent *const errors_present; Components::StoryBoardsPresent *const boards_view; - Components::ConceptView *const concept_view; + Components::StoryConceptsPresent *const concept_view; // 内部逻辑 =========================================== void build_internal(bool all_from_disk = false); diff --git a/WordsIDE/opstream.h b/WordsIDE/opstream.h new file mode 100644 index 0000000..5b9f9eb --- /dev/null +++ b/WordsIDE/opstream.h @@ -0,0 +1,104 @@ +#ifndef OPSTREAM_H +#define OPSTREAM_H + +#include +#include + +namespace Operate { + + template + class Result + { + public: + Result(QList source, std::function list_filter, std::function list_peaks) + : source_store(source), peak_store(list_peaks), filter_store(list_filter){} + virtual ~Result() = default; + + virtual QList toList() + { + QList rets_list; + + for(auto &it : source_store) + if(filter_store(it)) + rets_list << peak_store(it); + + return rets_list; + } + + template + QHash toMap(std::function key_selector) + { + QHash map; + + for(auto &it : source_store) + if(filter_store(it)) + map[key_selector(it)] = peak_store(it); + + return map; + } + + virtual void forEach(std::function ex_proc) + { + auto items = toList(); + for(auto &it : items) + ex_proc(it); + } + + Result filter(std::function filter){ + auto filter_combine = [filter, this](const ValueType& it){ return filter(it) && filter_store(it); }; + return Result(source_store, filter_combine, peak_store); + } + + template + Result select(std::function peak){ + auto peak_combine = [peak, this](const TargetType &it){ + auto temp = this->peak_store(it); + return peak(temp); + }; + return Result(source_store, filter_store, peak_combine); + } + + + private: + QList source_store; + std::function peak_store; + std::function filter_store; + }; + + + template + class OpStream + { + public: + OpStream(std::function peak_proc) + { + int count = 0, index = 0; + ValueType one = peak_proc(count, index); + for(; index < count; ++index) + source_store << peak_proc(count, index); + } + OpStream(QList source) + : source_store(source){} + + template + Result select(std::function value_selector) + { + return Result(source_store, [](const ValueType& it){return true;}, value_selector); + } + Result select() + { + return Result(source_store, [](const ValueType& it){return true;}, [](const ValueType& it){return it;}); + } + + Result filter(std::function filter) + { + return Result(source_store, filter, [](const ValueType& it){ return it; }); + } + + private: + QList source_store; + }; + +} + +#endif // OPSTREAM_H diff --git a/WordsIDE/projectview.cpp b/WordsIDE/projectview.cpp index 506a13f..f9271f3 100644 --- a/WordsIDE/projectview.cpp +++ b/WordsIDE/projectview.cpp @@ -106,13 +106,27 @@ void Components::ProjectView::contexMenuPopup(const QPoint &pos) auto root = pjtins->model()->item(0); auto seli = pjtins->model()->itemFromIndex(idx_it); - QList paths; - while (root != seli) { - paths.insert(0, seli->text()); - seli = seli->parent(); + + auto query_path = [root](QStandardItem *item)->QList + { + QList paths; + while (root != item) { + paths.insert(0, item->text()); + item = item->parent(); + } + return paths; + }; + + QList files; + for(auto &it : nodes_contained(seli)){ + auto path = query_path(it); + auto info = pjtins->queryWith(path); + if(info.exists()) + files << info; } - this->pjtins->deletePath(paths); + emit this->aboutToBoDelete(files); + this->pjtins->deletePath(query_path(seli)); }); auto item = this->pjtins->model()->itemFromIndex(idx_it); @@ -141,13 +155,19 @@ void Components::ProjectView::alloc_file(const QModelIndex &idx_it, const QStrin auto indi = this->pjtins->createFile(paths, name, suffix); switch (indi) { - case -1: - QMessageBox::critical(this, "系统错误", "传入的指定路径无效"); - return; - case -2: - QMessageBox::critical(this, "系统错误", "在文件下建立文件"); - return; + case -1: + QMessageBox::critical(this, "系统错误", "传入的指定路径无效"); + return; + case -2: + QMessageBox::critical(this, "系统错误", "在文件下建立文件"); + return; + case -3: + QMessageBox::critical(this, "系统错误", "指定名称重复"); + return; } + paths.append(name); + auto xinfo = this->pjtins->queryWith(paths); + emit this->activeDocument(xinfo.absoluteFilePath(), name); } void Components::ProjectView::project_configration() @@ -169,6 +189,20 @@ void Components::ProjectView::project_configration() dia.exec(); } +QList Components::ProjectView::nodes_contained(QStandardItem *root) +{ + QList coll; + coll << root; + + for(auto idx=0; idxrowCount(); ++idx) + { + coll << root->child(idx); + coll.append(nodes_contained(root->child(idx))); + } + + return coll; +} + diff --git a/WordsIDE/projectview.h b/WordsIDE/projectview.h index 57fbb57..08c516b 100644 --- a/WordsIDE/projectview.h +++ b/WordsIDE/projectview.h @@ -19,6 +19,7 @@ namespace Components { signals: void activeDocument(const QString &file_path, const QString &name); + void aboutToBoDelete(const QList &file_paths); private: Core::AppCore *const rtcore; @@ -29,6 +30,8 @@ namespace Components { void alloc_file(const QModelIndex &idx_it, const QString &type, const QString &suffix); void project_configration(); + + QList nodes_contained(QStandardItem *root); }; } diff --git a/WordsIDE/sourcecodeeditor.cpp b/WordsIDE/sourcecodeeditor.cpp index 410abfe..1343c9d 100644 --- a/WordsIDE/sourcecodeeditor.cpp +++ b/WordsIDE/sourcecodeeditor.cpp @@ -2,6 +2,7 @@ #include "keywordshightlighter.h" #include +#include #include #include @@ -14,6 +15,10 @@ SourceCodeEditor::SourceCodeEditor(Core::FileExtensionFactory *factory) { highlighter_ins->setDocument(this->textDocument()); + this->setContexMenuProcess([this](QMenu *menu){ + menu->addSeparator(); + menu->addAction("刷新", [this](){highlighter_ins->rehighlight();}); + }); } void SourceCodeEditor::concept_jump(const QList &path) @@ -49,7 +54,7 @@ Core::ExtensionFactory *SourceCodeEditor::factory() const return factory_ins; } -void SourceCodeEditor::reload(QList configs) +void SourceCodeEditor::reloadConfigrations(QList configs) { auto family = Config::ConfigHelper::getConfigAsDefaultSequence(configs, {"sourcecodeeditor-setting", "default", "font", "family"}, "微软雅黑"); auto size = Config::ConfigHelper::getConfigAsDefaultSequence(configs, {"sourcecodeeditor-setting", "default", "font", "size"}, "20"); @@ -86,10 +91,10 @@ void SourceCodeEditor::jumpTo(const QList &path) concept_jump(path); } -void SourceCodeEditor::setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) +void SourceCodeEditor::initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) { static_cast(highlighter_ins)->reset(core->parseCore()->queryDocument(src)); - FormattedTextEdit::setSource(core, src, parent); + FormattedTextEdit::initSource(core, src, parent); this->core_ins = core; } diff --git a/WordsIDE/sourcecodeeditor.h b/WordsIDE/sourcecodeeditor.h index 16db2c2..d6837a1 100644 --- a/WordsIDE/sourcecodeeditor.h +++ b/WordsIDE/sourcecodeeditor.h @@ -37,7 +37,7 @@ namespace Components { // Extension interface public: virtual Core::ExtensionFactory *factory() const override; - virtual void reload(QList configs) override; + virtual void reloadConfigrations(QList configs) override; virtual void resetProcsType(const QString &suffix) override; // ModeView interface @@ -49,7 +49,7 @@ namespace Components { // VariedTextView interface public: virtual void jumpTo(const QList &path) override; - virtual void setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) override; + virtual void initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) override; // FormattedTextEdit interface protected: diff --git a/WordsIDE/storyboardsourceedit.cpp b/WordsIDE/storyboardsourceedit.cpp index 278f908..39c8a55 100644 --- a/WordsIDE/storyboardsourceedit.cpp +++ b/WordsIDE/storyboardsourceedit.cpp @@ -28,7 +28,7 @@ FileExtensionFactory *StoryBoardSourceEdit::factory() const return factory_ins; } -void StoryBoardSourceEdit::reload(QList configs) +void StoryBoardSourceEdit::reloadConfigrations(QList configs) { // TODO: 设置格式 auto font_family = Config::ConfigHelper::getConfigAsDefaultSequence @@ -60,11 +60,11 @@ QString StoryBoardSourceEdit::title() const return source_target.fileName(); } -void StoryBoardSourceEdit::setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) +void StoryBoardSourceEdit::initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) { this->source_target = src; this->core_temp = core; - FormattedTextEdit::setSource(core, src, parent); + FormattedTextEdit::initSource(core, src, parent); static_cast(words_highlighter) ->reset(core->parseCore()->queryDocument(src)); rehighlighter(); diff --git a/WordsIDE/storyboardsourceedit.h b/WordsIDE/storyboardsourceedit.h index 8b41ef4..5b1c533 100644 --- a/WordsIDE/storyboardsourceedit.h +++ b/WordsIDE/storyboardsourceedit.h @@ -26,7 +26,7 @@ namespace Components { // Plugin interface public: virtual Core::FileExtensionFactory *factory() const override; - virtual void reload(QList configs) override; + virtual void reloadConfigrations(QList configs) override; // ModeView interface public: @@ -37,7 +37,7 @@ namespace Components { // VariedTextView interface public: - virtual void setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr) override; + virtual void initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr) override; virtual void jumpTo(const QList &path) override; // FormattedTextEdit interface diff --git a/WordsIDE/storychainsourceeditor.cpp b/WordsIDE/storychainsourceeditor.cpp index 97cae35..9f24f94 100644 --- a/WordsIDE/storychainsourceeditor.cpp +++ b/WordsIDE/storychainsourceeditor.cpp @@ -40,9 +40,9 @@ QString StoryChainSourceEdit::title() const return doc_ins->filePath(); } -void StoryChainSourceEdit::setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) +void StoryChainSourceEdit::initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) { - FormattedTextEdit::setSource(core, src, parent); + FormattedTextEdit::initSource(core, src, parent); this->doc_ins = core->parseCore()->queryDocument(src); this->core_ins = core; static_cast(this->highter_ins)->reset(doc_ins); @@ -54,7 +54,7 @@ FileExtensionFactory *StoryChainSourceEdit::factory() const return factory_ins; } -void StoryChainSourceEdit::reload(QList configs) +void StoryChainSourceEdit::reloadConfigrations(QList configs) { // TODO: 设置格式 auto font_family = Config::ConfigHelper::getConfigAsDefaultSequence diff --git a/WordsIDE/storychainsourceeditor.h b/WordsIDE/storychainsourceeditor.h index 7254922..57de3ca 100644 --- a/WordsIDE/storychainsourceeditor.h +++ b/WordsIDE/storychainsourceeditor.h @@ -43,13 +43,13 @@ namespace Components { // VariedTextView interface public: - virtual void setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr) override; + virtual void initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr) override; virtual void jumpTo(const QList &path) override; // Plugin interface public: virtual Core::FileExtensionFactory *factory() const override; - virtual void reload(QList configs) override; + virtual void reloadConfigrations(QList configs) override; // FormattedTextEdit interface protected: diff --git a/WordsIDE/conceptview.cpp b/WordsIDE/storyconceptspresent.cpp similarity index 51% rename from WordsIDE/conceptview.cpp rename to WordsIDE/storyconceptspresent.cpp index 627be1e..ea26366 100644 --- a/WordsIDE/conceptview.cpp +++ b/WordsIDE/storyconceptspresent.cpp @@ -1,58 +1,65 @@ -#include "conceptview.h" +#include "storyconceptspresent.h" #include "SensitiveCore.h" +#include "opstream.h" #include #include +using namespace Operate; using namespace Components; using namespace Core; using namespace Parse::Result; +using namespace Tools; -ConceptView::ConceptView(Core::AppCore *core, QWidget *parent) +StoryConceptsPresent::StoryConceptsPresent(Core::AppCore *core, QWidget *parent) : QWidget(parent), core_ins(core), tree_view(new QTreeView(this)), model_base(new QStandardItemModel(this)), - details_view(new QTextBrowser(this)) -{ - tree_view->setHeaderHidden(true); + details_view(new QTextBrowser(this)), + concept_model(new ModelSyncs( + model_base, + [](DesNode* dbase, QStandardItem *it)->bool{ return static_cast(dbase)->name()[0] == it->text(); }, +[](DesNode* dbase, QStandardItem *it){ it->setText(static_cast(dbase)->name()[0]); })){ +tree_view->setHeaderHidden(true); - auto layout = new QVBoxLayout(this); - layout->setMargin(0); +auto layout = new QVBoxLayout(this); +layout->setMargin(0); - auto splitter = new QSplitter(Qt::Vertical, this); - layout->addWidget(splitter); +auto splitter = new QSplitter(Qt::Vertical, this); +layout->addWidget(splitter); - splitter->addWidget(tree_view); - splitter->addWidget(details_view); +splitter->addWidget(tree_view); +splitter->addWidget(details_view); - tree_view->setModel(model_base); - details_view->setReadOnly(true); +tree_view->setModel(model_base); +details_view->setReadOnly(true); - connect(tree_view, &QTreeView::clicked, this, &ConceptView::show_node_description); - connect(tree_view, &QTreeView::doubleClicked, this, &ConceptView::click_to); +connect(tree_view, &QTreeView::clicked, this, &StoryConceptsPresent::show_node_description); +connect(tree_view, &QTreeView::doubleClicked, this, &StoryConceptsPresent::click_to); } -void ConceptView::refresh() +void StoryConceptsPresent::refresh() { - model_base->clear(); - auto units = core_ins->parseCore()->allStoryConcept(); - for(auto &unit : units){ - auto unit_node = new QStandardItem(static_cast(unit)->name()[0]); - unit_node->setEditable(false); - model_base->appendRow(unit_node); - - auto children = unit->children(); - for(auto &frag : children){ - if(frag->typeValue() == NODE_STORYSTRONGPOINT){ - auto frag_node = new QStandardItem(static_cast(frag)->name()[0]); - frag_node->setEditable(false); - unit_node->appendRow(frag_node); + this->concept_model->presentSync([this](DesNode *dit){ + if(dit){ + QList rets; + auto children = dit->children(); + for(auto &frag : children){ + if(frag->typeValue() == NODE_STORYSTRONGPOINT){ + rets << frag; + } } + + return rets; } - } + else{ + return core_ins->parseCore()->allStoryConcept(); + } + }); + } -void ConceptView::show_node_description(const QModelIndex &curr) +void StoryConceptsPresent::show_node_description(const QModelIndex &curr) { if(!curr.isValid()) return; @@ -80,7 +87,7 @@ void ConceptView::show_node_description(const QModelIndex &curr) } } -void ConceptView::click_to(const QModelIndex &curr) +void StoryConceptsPresent::click_to(const QModelIndex &curr) { if(!curr.isValid()) return; diff --git a/WordsIDE/conceptview.h b/WordsIDE/storyconceptspresent.h similarity index 59% rename from WordsIDE/conceptview.h rename to WordsIDE/storyconceptspresent.h index a77af70..fe57572 100644 --- a/WordsIDE/conceptview.h +++ b/WordsIDE/storyconceptspresent.h @@ -1,7 +1,9 @@ -#ifndef CONCEPTVIEW_H -#define CONCEPTVIEW_H +#ifndef STORYCONCEPTSPRESENT_H +#define STORYCONCEPTSPRESENT_H #include "appcore.h" +#include "tools.h" +#include #include #include @@ -9,10 +11,10 @@ #include namespace Components { - class ConceptView : public QWidget + class StoryConceptsPresent : public QWidget { public: - ConceptView(Core::AppCore *core, QWidget *parent=nullptr); + StoryConceptsPresent(Core::AppCore *core, QWidget *parent=nullptr); virtual void refresh(); @@ -21,6 +23,7 @@ namespace Components { QTreeView *const tree_view; QStandardItemModel *const model_base; QTextBrowser *const details_view; + Tools::ModelSyncs * concept_model; void show_node_description(const QModelIndex &curr); void click_to(const QModelIndex &curr); @@ -28,4 +31,4 @@ namespace Components { } -#endif // CONCEPTVIEW_H +#endif // STORYCONCEPTSPRESENT_H diff --git a/WordsIDE/storyunitsourceedit.cpp b/WordsIDE/storyunitsourceedit.cpp index b7f7e80..2dcbd2e 100644 --- a/WordsIDE/storyunitsourceedit.cpp +++ b/WordsIDE/storyunitsourceedit.cpp @@ -26,7 +26,7 @@ FileExtensionFactory *StoryUnitSourceEdit::factory() const return factory_ins; } -void StoryUnitSourceEdit::reload(QList configs) +void StoryUnitSourceEdit::reloadConfigrations(QList configs) { // TODO: 设置格式 auto font_family = Config::ConfigHelper::getConfigAsDefaultSequence @@ -66,11 +66,11 @@ void StoryUnitSourceEdit::rehighlighter() this->words_highlighter->rehighlight(); } -void StoryUnitSourceEdit::setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) +void StoryUnitSourceEdit::initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) { this->source_target = src; this->core_ins = core; - FormattedTextEdit::setSource(core, src, parent); + FormattedTextEdit::initSource(core, src, parent); static_cast(words_highlighter) ->reset(core->parseCore()->queryDocument(src)); rehighlighter(); diff --git a/WordsIDE/storyunitsourceedit.h b/WordsIDE/storyunitsourceedit.h index a5c2a26..7c26984 100644 --- a/WordsIDE/storyunitsourceedit.h +++ b/WordsIDE/storyunitsourceedit.h @@ -25,7 +25,7 @@ namespace Components { // Plugin interface public: virtual Core::FileExtensionFactory *factory() const override; - virtual void reload(QList configs) override; + virtual void reloadConfigrations(QList configs) override; // ModeView interface public: @@ -40,7 +40,7 @@ namespace Components { // VariedTextView interface public: - virtual void setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr) override; + virtual void initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent=nullptr) override; private: QSyntaxHighlighter *const words_highlighter; diff --git a/WordsIDE/storyvolumesourceedit.cpp b/WordsIDE/storyvolumesourceedit.cpp index cf46aaf..2801681 100644 --- a/WordsIDE/storyvolumesourceedit.cpp +++ b/WordsIDE/storyvolumesourceedit.cpp @@ -16,7 +16,7 @@ FileExtensionFactory *StoryVolumeSourceEdit::factory() const return factory_ins; } -void StoryVolumeSourceEdit::reload(QList configs) +void StoryVolumeSourceEdit::reloadConfigrations(QList configs) { // TODO: 设置格式 auto font_family = Config::ConfigHelper::getConfigAsDefaultSequence @@ -64,10 +64,10 @@ QString StoryVolumeSourceEdit::title() const return source_target.fileName(); } -void StoryVolumeSourceEdit::setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) +void StoryVolumeSourceEdit::initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) { this->source_target = src; - FormattedTextEdit::setSource(core, src, parent); + FormattedTextEdit::initSource(core, src, parent); static_cast(words_highlighter) ->reset(core->parseCore()->queryDocument(src)); rehighlighter(); diff --git a/WordsIDE/storyvolumesourceedit.h b/WordsIDE/storyvolumesourceedit.h index 1087060..b59a614 100644 --- a/WordsIDE/storyvolumesourceedit.h +++ b/WordsIDE/storyvolumesourceedit.h @@ -26,7 +26,7 @@ namespace Components { // Extension interface public: virtual Core::FileExtensionFactory *factory() const override; - virtual void reload(QList configs) override; + virtual void reloadConfigrations(QList configs) override; virtual void resetProcsType(const QString &suffix) override; // ModeView interface @@ -38,7 +38,7 @@ namespace Components { // VariedTextView interface public: - virtual void setSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) override; + virtual void initSource(Core::AppCore *core, const QFileInfo &src, QWidget *parent) override; // FormattedTextEdit interface protected: diff --git a/WordsIDE/tools.cpp b/WordsIDE/tools.cpp new file mode 100644 index 0000000..2fa7e97 --- /dev/null +++ b/WordsIDE/tools.cpp @@ -0,0 +1 @@ +#include "tools.h" diff --git a/WordsIDE/tools.h b/WordsIDE/tools.h new file mode 100644 index 0000000..47a434f --- /dev/null +++ b/WordsIDE/tools.h @@ -0,0 +1,91 @@ +#ifndef COMNTOOLS_H +#define COMNTOOLS_H + +#include "opstream.h" +#include +#include + +namespace Tools { + + template + class ModelSyncs + { + public: + ModelSyncs(QStandardItemModel *model_base, std::function _equal, + std::function sync_proc) + : model_present(model_base), sync_process(sync_proc), compare_process(_equal){} + + void presentSync(std::function(const BaseType &pnode)> items_peak) + { + auto default_pdata = BaseType(); + auto datas = items_peak(default_pdata); + + Operate::OpStream([this](int &cnt, int idx)->QStandardItem*{ + cnt = model_present->rowCount(); + return model_present->item(idx); + }).filter([&datas, this](QStandardItem *const &it)->bool{ + for(auto &d : datas) + if(compare_process(d, it)) + return false; + return true; + }).forEach([this](QStandardItem *const &it){ + model_present->removeRow(it->row()); + }); + + for (auto idx = 0; idx < datas.size(); ++idx) { + if (idx >= model_present->rowCount()) { + auto ins = new QStandardItem(); + ins->setEditable(false); + model_present->appendRow(ins); + } + + auto &data = datas[idx]; + auto item = model_present->item(idx); + sync_process(data, item); + + layer_items_sync(data, item, items_peak); + } + } + + + + private: + QStandardItemModel *model_present; + std::function sync_process; + std::function compare_process; + + void layer_items_sync(const BaseType &data, QStandardItem *pnode, + std::function(const BaseType &pnode)> items_peak){ + auto datas = items_peak(data); + + Operate::OpStream([pnode](int &cnt, int idx)->QStandardItem*{ + cnt = pnode->rowCount(); + return pnode->child(idx); + }).filter([&datas, this](QStandardItem *const &it)->bool{ + for(auto &d : datas) + if(compare_process(d, it)) + return false; + return true; + }).forEach([pnode](QStandardItem *const &it){ + pnode->removeRow(it->row()); + }); + + for (auto idx = 0; idx < datas.size(); ++idx) { + if (idx >= pnode->rowCount()) { + auto ins = new QStandardItem(); + ins->setEditable(false); + pnode->appendRow(ins); + } + + auto &data = datas[idx]; + auto item = pnode->child(idx); + sync_process(data, item); + + layer_items_sync(data, item, items_peak); + } + } + }; +} + + +#endif // COMNTOOLS_H diff --git a/libProjectManager/libProjectManager.h b/libProjectManager/libProjectManager.h index 00a62d6..412e22b 100644 --- a/libProjectManager/libProjectManager.h +++ b/libProjectManager/libProjectManager.h @@ -73,7 +73,7 @@ namespace Project { /** * @brief 在指定包路径下建立创建文本文件 * @param path 指定包路径 - * @return 0,成功;-1,指定路径不存在;-2,在文件下建立文件 + * @return 0,成功;-1,指定路径不存在;-2,在文件下建立文件;-3,相同层次名称重复 */ virtual int createFile(const QList &path, const QString &name, const QString &suffix) = 0; diff --git a/libProjectManager/xmlprojectmanager.cpp b/libProjectManager/xmlprojectmanager.cpp index adc85b2..32a8434 100644 --- a/libProjectManager/xmlprojectmanager.cpp +++ b/libProjectManager/xmlprojectmanager.cpp @@ -185,6 +185,18 @@ void XMLProjectManager::structure_severlize(ProjectNode *pnode, QDomElement &elm int XMLProjectManager::createFile(const QList &path, const QString &name, const QString &suffix) { + auto pnode = static_cast(mode_holder->item(0)); + auto group = node_follows(pnode, path); + if(group == nullptr) + return -1; + + if(group->nodeType() == NodeType::FILE) + return -2; + + for(auto idx=0; idxrowCount(); ++idx) + if(group->child(idx)->text() == name) + return -3; + auto root = QFileInfo(file_path).dir(); QRandomGenerator xgen(QDateTime::currentDateTime().offsetFromUtc()); @@ -198,14 +210,6 @@ int XMLProjectManager::createFile(const QList &path, const QString &nam return -3; tfile.close(); - auto pnode = static_cast(mode_holder->item(0)); - auto group = node_follows(pnode, path); - if(group == nullptr) - return -1; - - if(group->nodeType() == NodeType::FILE) - return -2; - auto filenode = new ProjectNode(NodeType::FILE, name); filenode->setFile(filename); group->appendRow(filenode);