Clang's warnings.
--HG-- branch : develop
This commit is contained in:
parent
e128317c9c
commit
a6ffb16054
815
src/app/app.pro
815
src/app/app.pro
|
@ -103,400 +103,437 @@ CONFIG(debug, debug|release){
|
||||||
# Debug
|
# Debug
|
||||||
unix {
|
unix {
|
||||||
*-g++{
|
*-g++{
|
||||||
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
|
QMAKE_CXXFLAGS += \
|
||||||
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
|
-isystem "/usr/include/qt5" \
|
||||||
-isystem "/usr/include/qt5/QtCore" -isystem "/usr/include/qt5/QtXmlPatterns" \
|
-isystem "/usr/include/qt5/QtWidgets" \
|
||||||
-isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" -isystem "$${RCC_DIR}" \
|
-isystem "/usr/include/qt5/QtXml" \
|
||||||
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
|
-isystem "/usr/include/qt5/QtGui" \
|
||||||
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
|
-isystem "/usr/include/qt5/QtXmlPatterns" \
|
||||||
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
|
-isystem "/usr/include/qt5/QtCore" \
|
||||||
-Wformat=2 -Wimport \
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
||||||
-Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
||||||
-Wmissing-include-dirs -Wpacked -Wredundant-decls -Winline \
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
||||||
-Wswitch-default -Wswitch-enum -Wuninitialized -Wvariadic-macros \
|
-O0 \
|
||||||
-Wlogical-op -Wnoexcept -Wmissing-noreturn -Wpointer-arith\
|
-Wall \
|
||||||
-Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3 \
|
-Wextra \
|
||||||
|
-pedantic \
|
||||||
|
-Weffc++ \
|
||||||
|
-Woverloaded-virtual \
|
||||||
|
-Wctor-dtor-privacy \
|
||||||
|
-Wnon-virtual-dtor \
|
||||||
|
-Wold-style-cast \
|
||||||
|
-Wconversion \
|
||||||
|
-Winit-self \
|
||||||
|
-Wstack-protector \
|
||||||
|
-Wunreachable-code \
|
||||||
|
-Wcast-align \
|
||||||
|
-Wcast-qual \
|
||||||
|
-Wdisabled-optimization \
|
||||||
|
-Wfloat-equal \
|
||||||
|
-Wformat=2 \
|
||||||
|
-Wimport \
|
||||||
|
-Wmissing-include-dirs \
|
||||||
|
-Wpacked \
|
||||||
|
-Wredundant-decls \
|
||||||
|
-Winline \
|
||||||
|
-Winvalid-pch \
|
||||||
|
-Wunsafe-loop-optimizations \
|
||||||
|
-Wlong-long \
|
||||||
|
-Wmissing-format-attribute \
|
||||||
|
-Wswitch-default \
|
||||||
|
-Wswitch-enum \
|
||||||
|
-Wuninitialized \
|
||||||
|
-Wvariadic-macros \
|
||||||
|
-Wlogical-op \
|
||||||
|
-Wnoexcept \
|
||||||
|
-Wmissing-noreturn \
|
||||||
|
-Wpointer-arith \
|
||||||
|
-Wstrict-null-sentinel \
|
||||||
|
-Wstrict-overflow=5 \
|
||||||
|
-Wundef \
|
||||||
|
-Wno-unused \
|
||||||
|
-gdwarf-3 \
|
||||||
-ftrapv
|
-ftrapv
|
||||||
}
|
}
|
||||||
#Turn on Clang warnings
|
#Turn on Clang warnings
|
||||||
clang*{
|
clang*{
|
||||||
QMAKE_CXXFLAGS += \
|
QMAKE_CXXFLAGS += \
|
||||||
-isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
|
-isystem "/usr/include/qt5" \
|
||||||
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
|
-isystem "/usr/include/qt5/QtWidgets" \
|
||||||
-isystem "/usr/include/qt5/QtCore" -isystem "/usr/include/qt5/QtXmlPatterns" \
|
-isystem "/usr/include/qt5/QtXml" \
|
||||||
-isystem "$${UI_DIR}" -isystem "$${OUT_PWD}/$${MOC_DIR}" -isystem "$${RCC_DIR}" \
|
-isystem "/usr/include/qt5/QtGui" \
|
||||||
-O0 \
|
-isystem "/usr/include/qt5/QtCore" \
|
||||||
-fparse-all-comments \
|
-isystem "/usr/include/qt5/QtXmlPatterns" \
|
||||||
-Wabi \
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
||||||
-Wabstract-final-class \
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
||||||
-Wabstract-vbase-init \
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
||||||
-Waddress \
|
-O0 \
|
||||||
-Waddress-of-array-temporary \
|
-fparse-all-comments \
|
||||||
-Waddress-of-temporary \
|
-Wabi \
|
||||||
-Waggregate-return \
|
-Wabstract-final-class \
|
||||||
-Wall \
|
-Wabstract-vbase-init \
|
||||||
-Wambiguous-macro \
|
-Waddress \
|
||||||
-Wambiguous-member-template \
|
-Waddress-of-array-temporary \
|
||||||
-Wanalyzer-incompatible-plugin \
|
-Waddress-of-temporary \
|
||||||
-Wanonymous-pack-parens \
|
-Waggregate-return \
|
||||||
-Warc \
|
-Wall \
|
||||||
-Warc-abi \
|
-Wambiguous-macro \
|
||||||
-Warc-bridge-casts-disallowed-in-nonarc \
|
-Wambiguous-member-template \
|
||||||
-Warc-maybe-repeated-use-of-weak \
|
-Wanalyzer-incompatible-plugin \
|
||||||
-Warc-non-pod-memaccess \
|
-Wanonymous-pack-parens \
|
||||||
-Warc-performSelector-leaks \
|
-Warc \
|
||||||
-Warc-repeated-use-of-weak \
|
-Warc-abi \
|
||||||
-Warc-retain-cycles \
|
-Warc-bridge-casts-disallowed-in-nonarc \
|
||||||
-Warc-unsafe-retained-assign \
|
-Warc-maybe-repeated-use-of-weak \
|
||||||
-Warray-bounds \
|
-Warc-non-pod-memaccess \
|
||||||
-Warray-bounds-pointer-arithmetic \
|
-Warc-performSelector-leaks \
|
||||||
-Wasm \
|
-Warc-repeated-use-of-weak \
|
||||||
-Wasm-operand-widths \
|
-Warc-retain-cycles \
|
||||||
-Wassign-enum \
|
-Warc-unsafe-retained-assign \
|
||||||
-Watomic-properties \
|
-Warray-bounds \
|
||||||
-Watomic-property-with-user-defined-accessor \
|
-Warray-bounds-pointer-arithmetic \
|
||||||
-Wattributes \
|
-Wasm \
|
||||||
-Wauto-import \
|
-Wasm-operand-widths \
|
||||||
-Wauto-storage-class \
|
-Wassign-enum \
|
||||||
-Wauto-var-id \
|
-Watomic-properties \
|
||||||
-Wavailability \
|
-Watomic-property-with-user-defined-accessor \
|
||||||
-Wbackslash-newline-escape \
|
-Wattributes \
|
||||||
-Wbad-array-new-length \
|
-Wauto-import \
|
||||||
-Wbad-function-cast \
|
-Wauto-storage-class \
|
||||||
-Wbind-to-temporary-copy \
|
-Wauto-var-id \
|
||||||
-Wbitfield-constant-conversion \
|
-Wavailability \
|
||||||
-Wbitwise-op-parentheses \
|
-Wbackslash-newline-escape \
|
||||||
-Wbool-conversion \
|
-Wbad-array-new-length \
|
||||||
-Wbool-conversions \
|
-Wbad-function-cast \
|
||||||
-Wbuiltin-macro-redefined \
|
-Wbind-to-temporary-copy \
|
||||||
-Wbuiltin-requires-header \
|
-Wbitfield-constant-conversion \
|
||||||
-Wc++-compat \
|
-Wbitwise-op-parentheses \
|
||||||
-Wc++0x-compat \
|
-Wbool-conversion \
|
||||||
-Wc++0x-extensions \
|
-Wbool-conversions \
|
||||||
-Wc++0x-narrowing \
|
-Wbuiltin-macro-redefined \
|
||||||
-Wc++11-compat \
|
-Wbuiltin-requires-header \
|
||||||
-Wc++11-compat-pedantic \
|
-Wc++-compat \
|
||||||
-Wc++11-compat-reserved-user-defined-literal \
|
-Wc++0x-compat \
|
||||||
-Wc++11-extensions \
|
-Wc++0x-extensions \
|
||||||
-Wc++11-extra-semi \
|
-Wc++0x-narrowing \
|
||||||
-Wc++11-long-long \
|
-Wc++11-compat \
|
||||||
-Wc++11-narrowing \
|
-Wc++11-compat-pedantic \
|
||||||
-Wc11-extensions \
|
-Wc++11-compat-reserved-user-defined-literal \
|
||||||
-Wcast-align \
|
-Wc++11-extensions \
|
||||||
-Wcast-of-sel-type \
|
-Wc++11-extra-semi \
|
||||||
-Wcast-qual \
|
-Wc++11-long-long \
|
||||||
-WCFString-literal \
|
-Wc++11-narrowing \
|
||||||
-Wchar-align \
|
-Wc11-extensions \
|
||||||
-Wchar-subscripts \
|
-Wcast-align \
|
||||||
-Wcomment \
|
-Wcast-of-sel-type \
|
||||||
-Wcomments \
|
-Wcast-qual \
|
||||||
-Wcompare-distinct-pointer-types \
|
-WCFString-literal \
|
||||||
-Wcomplex-component-init \
|
-Wchar-align \
|
||||||
-Wconditional-type-mismatch \
|
-Wchar-subscripts \
|
||||||
-Wconditional-uninitialized \
|
-Wcomment \
|
||||||
-Wconfig-macros \
|
-Wcomments \
|
||||||
-Wconstant-conversion \
|
-Wcompare-distinct-pointer-types \
|
||||||
-Wconstant-logical-operand \
|
-Wcomplex-component-init \
|
||||||
-Wconstexpr-not-const \
|
-Wconditional-type-mismatch \
|
||||||
-Wconversion \
|
-Wconditional-uninitialized \
|
||||||
-Wconversion-null \
|
-Wconfig-macros \
|
||||||
-Wcovered-switch-default \
|
-Wconstant-conversion \
|
||||||
-Wctor-dtor-privacy \
|
-Wconstant-logical-operand \
|
||||||
-Wcustom-atomic-properties \
|
-Wconstexpr-not-const \
|
||||||
-Wdangling-else \
|
-Wconversion \
|
||||||
-Wdangling-field \
|
-Wconversion-null \
|
||||||
-Wdangling-initializer-list \
|
-Wno-covered-switch-default \
|
||||||
-Wdeclaration-after-statement \
|
-Wctor-dtor-privacy \
|
||||||
-Wdelegating-ctor-cycles \
|
-Wcustom-atomic-properties \
|
||||||
-Wdelete-incomplete \
|
-Wdangling-else \
|
||||||
-Wdelete-non-virtual-dtor \
|
-Wdangling-field \
|
||||||
-Wdeprecated \
|
-Wdangling-initializer-list \
|
||||||
-Wdeprecated-declarations \
|
-Wdeclaration-after-statement \
|
||||||
-Wdeprecated-implementations \
|
-Wdelegating-ctor-cycles \
|
||||||
-Wdeprecated-objc-isa-usage \
|
-Wdelete-incomplete \
|
||||||
-Wdeprecated-objc-pointer-introspection \
|
-Wdelete-non-virtual-dtor \
|
||||||
-Wdeprecated-objc-pointer-introspection-performSelector \
|
-Wdeprecated \
|
||||||
-Wdeprecated-register \
|
-Wdeprecated-declarations \
|
||||||
-Wdeprecated-writable-strings \
|
-Wdeprecated-implementations \
|
||||||
-Wdirect-ivar-access \
|
-Wdeprecated-objc-isa-usage \
|
||||||
-Wdisabled-macro-expansion \
|
-Wdeprecated-objc-pointer-introspection \
|
||||||
-Wdisabled-optimization \
|
-Wdeprecated-objc-pointer-introspection-performSelector \
|
||||||
-Wdiscard-qual \
|
-Wdeprecated-register \
|
||||||
-Wdistributed-object-modifiers \
|
-Wdeprecated-writable-strings \
|
||||||
-Wdiv-by-zero \
|
-Wdirect-ivar-access \
|
||||||
-Wdivision-by-zero \
|
-Wdisabled-macro-expansion \
|
||||||
-Wdocumentation \
|
-Wdisabled-optimization \
|
||||||
-Wdocumentation-deprecated-sync \
|
-Wdiscard-qual \
|
||||||
-Wdocumentation-html \
|
-Wdistributed-object-modifiers \
|
||||||
-Wdollar-in-identifier-extension \
|
-Wdiv-by-zero \
|
||||||
-Wduplicate-decl-specifier \
|
-Wdivision-by-zero \
|
||||||
-Wduplicate-enum \
|
-Wdocumentation \
|
||||||
-Wduplicate-method-arg \
|
-Wdocumentation-deprecated-sync \
|
||||||
-Wduplicate-method-match \
|
-Wdocumentation-html \
|
||||||
-Wdynamic-class-memaccess \
|
-Wdollar-in-identifier-extension \
|
||||||
-Weffc++ \
|
-Wduplicate-decl-specifier \
|
||||||
-Wembedded-directive \
|
-Wduplicate-enum \
|
||||||
-Wempty-body \
|
-Wduplicate-method-arg \
|
||||||
-Wempty-translation-unit \
|
-Wduplicate-method-match \
|
||||||
-Wendif-labels \
|
-Wdynamic-class-memaccess \
|
||||||
-Wenum-compare \
|
-Weffc++ \
|
||||||
-Wenum-conversion \
|
-Wembedded-directive \
|
||||||
-Wexit-time-destructors \
|
-Wempty-body \
|
||||||
-Wexplicit-ownership-type \
|
-Wempty-translation-unit \
|
||||||
-Wextended-offsetof \
|
-Wendif-labels \
|
||||||
-Wextern-initializer \
|
-Wenum-compare \
|
||||||
-Wextra \
|
-Wenum-conversion \
|
||||||
-Wextra-semi \
|
-Wexplicit-ownership-type \
|
||||||
-Wextra-tokens \
|
-Wextended-offsetof \
|
||||||
-Wflexible-array-extensions \
|
-Wextern-initializer \
|
||||||
-Wfloat-equal \
|
-Wextra \
|
||||||
-Wformat \
|
-Wextra-semi \
|
||||||
-Wformat-extra-args \
|
-Wextra-tokens \
|
||||||
-Wformat-invalid-specifier \
|
-Wflexible-array-extensions \
|
||||||
-Wformat-non-iso \
|
-Wfloat-equal \
|
||||||
-Wformat-nonliteral \
|
-Wformat \
|
||||||
-Wformat-security \
|
-Wformat-extra-args \
|
||||||
-Wformat-y2k \
|
-Wformat-invalid-specifier \
|
||||||
-Wformat-zero-length \
|
-Wformat-non-iso \
|
||||||
-Wformat=2 \
|
-Wformat-nonliteral \
|
||||||
-Wfour-char-constants \
|
-Wformat-security \
|
||||||
-Wgcc-compat \
|
-Wformat-y2k \
|
||||||
-Wglobal-constructors \
|
-Wformat-zero-length \
|
||||||
-Wgnu \
|
-Wformat=2 \
|
||||||
-Wgnu-array-member-paren-init \
|
-Wfour-char-constants \
|
||||||
-Wgnu-designator \
|
-Wgcc-compat \
|
||||||
-Wgnu-static-float-init \
|
-Wgnu \
|
||||||
-Wheader-guard \
|
-Wgnu-array-member-paren-init \
|
||||||
-Wheader-hygiene \
|
-Wgnu-designator \
|
||||||
-Widiomatic-parentheses \
|
-Wgnu-static-float-init \
|
||||||
-Wignored-attributes \
|
-Wheader-guard \
|
||||||
-Wignored-qualifiers \
|
-Wheader-hygiene \
|
||||||
-Wimplicit \
|
-Widiomatic-parentheses \
|
||||||
-Wimplicit-atomic-properties \
|
-Wignored-attributes \
|
||||||
-Wimplicit-conversion-floating-point-to-bool \
|
-Wignored-qualifiers \
|
||||||
-Wimplicit-exception-spec-mismatch \
|
-Wimplicit \
|
||||||
-Wimplicit-fallthrough \
|
-Wimplicit-atomic-properties \
|
||||||
-Wimplicit-fallthrough-per-function \
|
-Wimplicit-conversion-floating-point-to-bool \
|
||||||
-Wimplicit-function-declaration \
|
-Wimplicit-exception-spec-mismatch \
|
||||||
-Wimplicit-int \
|
-Wimplicit-fallthrough \
|
||||||
-Wimplicit-retain-self \
|
-Wimplicit-fallthrough-per-function \
|
||||||
-Wimport \
|
-Wimplicit-function-declaration \
|
||||||
-Wimport-preprocessor-directive-pedantic \
|
-Wimplicit-int \
|
||||||
-Wincompatible-library-redeclaration \
|
-Wimplicit-retain-self \
|
||||||
-Wincompatible-pointer-types \
|
-Wimport \
|
||||||
-Wincompatible-pointer-types-discards-qualifiers \
|
-Wimport-preprocessor-directive-pedantic \
|
||||||
-Wincomplete-implementation \
|
-Wincompatible-library-redeclaration \
|
||||||
-Wincomplete-module \
|
-Wincompatible-pointer-types \
|
||||||
-Wincomplete-umbrella \
|
-Wincompatible-pointer-types-discards-qualifiers \
|
||||||
-Winherited-variadic-ctor \
|
-Wincomplete-implementation \
|
||||||
-Winit-self \
|
-Wincomplete-module \
|
||||||
-Winitializer-overrides \
|
-Wincomplete-umbrella \
|
||||||
-Winline \
|
-Winherited-variadic-ctor \
|
||||||
-Wint-conversion \
|
-Winit-self \
|
||||||
-Wint-conversions \
|
-Winitializer-overrides \
|
||||||
-Wint-to-pointer-cast \
|
-Winline \
|
||||||
-Wint-to-void-pointer-cast \
|
-Wint-conversion \
|
||||||
-Winteger-overflow \
|
-Wint-conversions \
|
||||||
-Winvalid-constexpr \
|
-Wint-to-pointer-cast \
|
||||||
-Winvalid-iboutlet \
|
-Wint-to-void-pointer-cast \
|
||||||
-Winvalid-noreturn \
|
-Winteger-overflow \
|
||||||
-Winvalid-offsetof \
|
-Winvalid-constexpr \
|
||||||
-Winvalid-pch \
|
-Winvalid-iboutlet \
|
||||||
-Winvalid-pp-token \
|
-Winvalid-noreturn \
|
||||||
-Winvalid-source-encoding \
|
-Winvalid-offsetof \
|
||||||
-Winvalid-token-paste \
|
-Winvalid-pch \
|
||||||
-Wknr-promoted-parameter \
|
-Winvalid-pp-token \
|
||||||
-Wlanguage-extension-token \
|
-Winvalid-source-encoding \
|
||||||
-Wlarge-by-value-copy \
|
-Winvalid-token-paste \
|
||||||
-Wliteral-conversion \
|
-Wknr-promoted-parameter \
|
||||||
-Wliteral-range \
|
-Wlanguage-extension-token \
|
||||||
-Wlocal-type-template-args \
|
-Wlarge-by-value-copy \
|
||||||
-Wlogical-not-parentheses \
|
-Wliteral-conversion \
|
||||||
-Wlogical-op-parentheses \
|
-Wliteral-range \
|
||||||
-Wlong-long \
|
-Wlocal-type-template-args \
|
||||||
-Wloop-analysis \
|
-Wlogical-not-parentheses \
|
||||||
-Wmain \
|
-Wlogical-op-parentheses \
|
||||||
-Wmain-return-type \
|
-Wlong-long \
|
||||||
-Wmalformed-warning-check \
|
-Wloop-analysis \
|
||||||
-Wmethod-signatures \
|
-Wmain \
|
||||||
-Wmicrosoft \
|
-Wmain-return-type \
|
||||||
-Wmicrosoft-exists \
|
-Wmalformed-warning-check \
|
||||||
-Wmismatched-parameter-types \
|
-Wmethod-signatures \
|
||||||
-Wmismatched-return-types \
|
-Wmicrosoft \
|
||||||
-Wmismatched-tags \
|
-Wmicrosoft-exists \
|
||||||
-Wmissing-braces \
|
-Wmismatched-parameter-types \
|
||||||
-Wmissing-declarations \
|
-Wmismatched-return-types \
|
||||||
-Wmissing-field-initializers \
|
-Wmismatched-tags \
|
||||||
-Wmissing-format-attribute \
|
-Wmissing-braces \
|
||||||
-Wmissing-include-dirs \
|
-Wmissing-declarations \
|
||||||
-Wmissing-method-return-type \
|
-Wmissing-field-initializers \
|
||||||
-Wmissing-noreturn \
|
-Wmissing-format-attribute \
|
||||||
-Wmissing-prototypes \
|
-Wmissing-include-dirs \
|
||||||
-Wmissing-selector-name \
|
-Wmissing-method-return-type \
|
||||||
-Wmissing-sysroot \
|
-Wmissing-noreturn \
|
||||||
-Wmissing-variable-declarations \
|
-Wmissing-prototypes \
|
||||||
-Wmodule-conflict \
|
-Wmissing-selector-name \
|
||||||
-Wmost \
|
-Wmissing-sysroot \
|
||||||
-Wmultichar \
|
-Wmissing-variable-declarations \
|
||||||
-Wnarrowing \
|
-Wmodule-conflict \
|
||||||
-Wnested-anon-types \
|
-Wmost \
|
||||||
-Wnested-externs \
|
-Wmultichar \
|
||||||
-Wnewline-eof \
|
-Wnarrowing \
|
||||||
-Wnon-gcc \
|
-Wnested-externs \
|
||||||
-Wnon-literal-null-conversion \
|
-Wnewline-eof \
|
||||||
-Wnon-pod-varargs \
|
-Wnon-gcc \
|
||||||
-Wnon-virtual-dtor \
|
-Wnon-literal-null-conversion \
|
||||||
-Wnonnull \
|
-Wnon-pod-varargs \
|
||||||
-Wnonportable-cfstrings \
|
-Wnon-virtual-dtor \
|
||||||
-WNSObject-attribute \
|
-Wnonnull \
|
||||||
-Wnull-arithmetic \
|
-Wnonportable-cfstrings \
|
||||||
-Wnull-character \
|
-WNSObject-attribute \
|
||||||
-Wnull-conversion \
|
-Wnull-arithmetic \
|
||||||
-Wnull-dereference \
|
-Wnull-character \
|
||||||
-Wodr \
|
-Wnull-conversion \
|
||||||
-Wold-style-cast \
|
-Wnull-dereference \
|
||||||
-Wold-style-definition \
|
-Wodr \
|
||||||
-Wout-of-line-declaration \
|
-Wold-style-cast \
|
||||||
-Wover-aligned \
|
-Wold-style-definition \
|
||||||
-Woverflow \
|
-Wout-of-line-declaration \
|
||||||
-Woverlength-strings \
|
-Wover-aligned \
|
||||||
-Woverloaded-shift-op-parentheses \
|
-Woverflow \
|
||||||
-Woverloaded-virtual \
|
-Woverlength-strings \
|
||||||
-Woverriding-method-mismatch \
|
-Woverloaded-shift-op-parentheses \
|
||||||
-Wpacked \
|
-Woverloaded-virtual \
|
||||||
-Wpadded \
|
-Woverriding-method-mismatch \
|
||||||
-Wparentheses \
|
-Wpacked \
|
||||||
-Wparentheses-equality \
|
-Wparentheses \
|
||||||
-Wpedantic \
|
-Wparentheses-equality \
|
||||||
-Wpointer-arith \
|
-Wpedantic \
|
||||||
-Wpointer-sign \
|
-Wpointer-arith \
|
||||||
-Wpointer-to-int-cast \
|
-Wpointer-sign \
|
||||||
-Wpointer-type-mismatch \
|
-Wpointer-to-int-cast \
|
||||||
-Wpredefined-identifier-outside-function \
|
-Wpointer-type-mismatch \
|
||||||
-Wprivate-extern \
|
-Wpredefined-identifier-outside-function \
|
||||||
-Wprotocol \
|
-Wprivate-extern \
|
||||||
-Wprotocol-property-synthesis-ambiguity \
|
-Wprotocol \
|
||||||
-Wreadonly-iboutlet-property \
|
-Wprotocol-property-synthesis-ambiguity \
|
||||||
-Wreceiver-expr \
|
-Wreadonly-iboutlet-property \
|
||||||
-Wreceiver-forward-class \
|
-Wreceiver-expr \
|
||||||
-Wreceiver-is-weak \
|
-Wreceiver-forward-class \
|
||||||
-Wredundant-decls \
|
-Wreceiver-is-weak \
|
||||||
-Wreinterpret-base-class \
|
-Wredundant-decls \
|
||||||
-Wreorder \
|
-Wreinterpret-base-class \
|
||||||
-Wrequires-super-attribute \
|
-Wreorder \
|
||||||
-Wreserved-user-defined-literal \
|
-Wrequires-super-attribute \
|
||||||
-Wreturn-stack-address \
|
-Wreserved-user-defined-literal \
|
||||||
-Wreturn-type \
|
-Wreturn-stack-address \
|
||||||
-Wreturn-type-c-linkage \
|
-Wreturn-type \
|
||||||
-Wsection \
|
-Wreturn-type-c-linkage \
|
||||||
-Wselector \
|
-Wsection \
|
||||||
-Wselector-type-mismatch \
|
-Wselector \
|
||||||
-Wself-assign \
|
-Wselector-type-mismatch \
|
||||||
-Wself-assign-field \
|
-Wself-assign \
|
||||||
-Wsemicolon-before-method-body \
|
-Wself-assign-field \
|
||||||
-Wsentinel \
|
-Wsemicolon-before-method-body \
|
||||||
-Wsequence-point \
|
-Wsentinel \
|
||||||
-Wserialized-diagnostics \
|
-Wsequence-point \
|
||||||
-Wshadow-ivar \
|
-Wserialized-diagnostics \
|
||||||
-Wshift-count-negative \
|
-Wshadow-ivar \
|
||||||
-Wshift-count-overflow \
|
-Wshift-count-negative \
|
||||||
-Wshift-op-parentheses \
|
-Wshift-count-overflow \
|
||||||
-Wshift-overflow \
|
-Wshift-op-parentheses \
|
||||||
-Wshift-sign-overflow \
|
-Wshift-overflow \
|
||||||
-Wshorten-64-to-32 \
|
-Wshift-sign-overflow \
|
||||||
-Wsign-compare \
|
-Wshorten-64-to-32 \
|
||||||
-Wsign-conversion \
|
-Wsign-compare \
|
||||||
-Wsign-promo \
|
-Wsign-conversion \
|
||||||
-Wsizeof-array-argument \
|
-Wsign-promo \
|
||||||
-Wsizeof-array-decay \
|
-Wsizeof-array-argument \
|
||||||
-Wsizeof-pointer-memaccess \
|
-Wsizeof-array-decay \
|
||||||
-Wsometimes-uninitialized \
|
-Wsizeof-pointer-memaccess \
|
||||||
-Wsource-uses-openmp \
|
-Wsometimes-uninitialized \
|
||||||
-Wstack-protector \
|
-Wsource-uses-openmp \
|
||||||
-Wstatic-float-init \
|
-Wstack-protector \
|
||||||
-Wstatic-in-inline \
|
-Wstatic-float-init \
|
||||||
-Wstatic-local-in-inline \
|
-Wstatic-in-inline \
|
||||||
-Wstatic-self-init \
|
-Wstatic-local-in-inline \
|
||||||
-Wstrict-aliasing \
|
-Wstatic-self-init \
|
||||||
-Wstrict-aliasing=0 \
|
-Wstrict-aliasing \
|
||||||
-Wstrict-aliasing=1 \
|
-Wstrict-aliasing=0 \
|
||||||
-Wstrict-aliasing=2 \
|
-Wstrict-aliasing=1 \
|
||||||
-Wstrict-overflow \
|
-Wstrict-aliasing=2 \
|
||||||
-Wstrict-overflow=0 \
|
-Wstrict-overflow \
|
||||||
-Wstrict-overflow=1 \
|
-Wstrict-overflow=0 \
|
||||||
-Wstrict-overflow=2 \
|
-Wstrict-overflow=1 \
|
||||||
-Wstrict-overflow=3 \
|
-Wstrict-overflow=2 \
|
||||||
-Wstrict-overflow=4 \
|
-Wstrict-overflow=3 \
|
||||||
-Wstrict-overflow=5 \
|
-Wstrict-overflow=4 \
|
||||||
-Wstrict-prototypes \
|
-Wstrict-overflow=5 \
|
||||||
-Wstrict-selector-match \
|
-Wstrict-prototypes \
|
||||||
-Wstring-compare \
|
-Wstrict-selector-match \
|
||||||
-Wstring-conversion \
|
-Wstring-compare \
|
||||||
-Wstring-plus-int \
|
-Wstring-conversion \
|
||||||
-Wstrlcpy-strlcat-size \
|
-Wstring-plus-int \
|
||||||
-Wstrncat-size \
|
-Wstrlcpy-strlcat-size \
|
||||||
-Wsuper-class-method-mismatch \
|
-Wstrncat-size \
|
||||||
-Wswitch \
|
-Wsuper-class-method-mismatch \
|
||||||
-Wswitch-default \
|
-Wswitch \
|
||||||
-Wswitch-enum \
|
-Wswitch-default \
|
||||||
-Wsynth \
|
-Wswitch-enum \
|
||||||
-Wtautological-compare \
|
-Wsynth \
|
||||||
-Wtautological-constant-out-of-range-compare \
|
-Wtautological-compare \
|
||||||
-Wtentative-definition-incomplete-type \
|
-Wtautological-constant-out-of-range-compare \
|
||||||
-Wthread-safety \
|
-Wtentative-definition-incomplete-type \
|
||||||
-Wthread-safety-analysis \
|
-Wthread-safety \
|
||||||
-Wthread-safety-attributes \
|
-Wthread-safety-analysis \
|
||||||
-Wthread-safety-beta \
|
-Wthread-safety-attributes \
|
||||||
-Wthread-safety-precise \
|
-Wthread-safety-beta \
|
||||||
-Wtrigraphs \
|
-Wthread-safety-precise \
|
||||||
-Wtype-limits \
|
-Wtrigraphs \
|
||||||
-Wtype-safety \
|
-Wtype-limits \
|
||||||
-Wtypedef-redefinition \
|
-Wtype-safety \
|
||||||
-Wtypename-missing \
|
-Wtypedef-redefinition \
|
||||||
-Wundeclared-selector \
|
-Wtypename-missing \
|
||||||
-Wundef \
|
-Wundeclared-selector \
|
||||||
-Wundefined-inline \
|
-Wundef \
|
||||||
-Wundefined-internal \
|
-Wundefined-inline \
|
||||||
-Wundefined-reinterpret-cast \
|
-Wundefined-internal \
|
||||||
-Wunicode \
|
-Wundefined-reinterpret-cast \
|
||||||
-Wunicode-whitespace \
|
-Wunicode \
|
||||||
-Wuninitialized \
|
-Wunicode-whitespace \
|
||||||
-Wunknown-pragmas \
|
-Wuninitialized \
|
||||||
-Wunknown-warning-option \
|
-Wunknown-warning-option \
|
||||||
-Wunnamed-type-template-args \
|
-Wunnamed-type-template-args \
|
||||||
-Wunneeded-internal-declaration \
|
-Wunneeded-internal-declaration \
|
||||||
-Wunneeded-member-function \
|
-Wunneeded-member-function \
|
||||||
-Wunsequenced \
|
-Wunsequenced \
|
||||||
-Wunsupported-visibility \
|
-Wunsupported-visibility \
|
||||||
-Wunused \
|
-Wunused \
|
||||||
-Wunused-argument \
|
-Wunused-argument \
|
||||||
-Wunused-command-line-argument \
|
-Wunused-command-line-argument \
|
||||||
-Wunused-comparison \
|
-Wunused-comparison \
|
||||||
-Wunused-exception-parameter \
|
-Wunused-exception-parameter \
|
||||||
-Wunused-function \
|
-Wunused-function \
|
||||||
-Wunused-label \
|
-Wunused-label \
|
||||||
-Wunused-member-function \
|
-Wunused-member-function \
|
||||||
-Wunused-parameter \
|
-Wunused-parameter \
|
||||||
-Wunused-private-field \
|
-Wunused-private-field \
|
||||||
-Wunused-result \
|
-Wunused-result \
|
||||||
-Wunused-sanitize-argument \
|
-Wunused-sanitize-argument \
|
||||||
-Wunused-value \
|
-Wunused-value \
|
||||||
-Wunused-variable \
|
-Wunused-variable \
|
||||||
-Wunused-volatile-lvalue \
|
-Wunused-volatile-lvalue \
|
||||||
-Wuser-defined-literals \
|
-Wuser-defined-literals \
|
||||||
-Wvarargs \
|
-Wvarargs \
|
||||||
-Wvariadic-macros \
|
-Wvariadic-macros \
|
||||||
-Wvector-conversion \
|
-Wvector-conversion \
|
||||||
-Wvector-conversions \
|
-Wvector-conversions \
|
||||||
-Wvexing-parse \
|
-Wvexing-parse \
|
||||||
-Wvisibility \
|
-Wvisibility \
|
||||||
-Wvla \
|
-Wvla \
|
||||||
-Wvla-extension \
|
-Wvla-extension \
|
||||||
-Wvolatile-register-var \
|
-Wvolatile-register-var \
|
||||||
-Wweak-template-vtables \
|
-Wweak-template-vtables \
|
||||||
-Wweak-vtables \
|
-Wweak-vtables \
|
||||||
-Wwrite-strings \
|
-Wwrite-strings \
|
||||||
-Wzero-length-array
|
-Wzero-length-array
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*-g++{#Don't use additional GCC keys on Windows system.
|
*-g++{#Don't use additional GCC keys on Windows system.
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include "../widgets/vapplication.h"
|
#include "../widgets/vapplication.h"
|
||||||
|
|
||||||
|
using namespace qmu;
|
||||||
|
|
||||||
int Calculator::iVal = -1;
|
int Calculator::iVal = -1;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -78,7 +80,7 @@ Calculator::Calculator(const VContainer *data)
|
||||||
* numbers = cal->GetNumbers();
|
* numbers = cal->GetNumbers();
|
||||||
* delete cal;
|
* delete cal;
|
||||||
*
|
*
|
||||||
* @param data pointer to a variable container.
|
* @param formula string with formula.
|
||||||
* @param fromUser true if we parse formula from user
|
* @param fromUser true if we parse formula from user
|
||||||
*/
|
*/
|
||||||
Calculator::Calculator(const QString &formula, bool fromUser)
|
Calculator::Calculator(const QString &formula, bool fromUser)
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include "vcontainer.h"
|
#include "vcontainer.h"
|
||||||
|
|
||||||
#include "../../libs/qmuparser/qmuparser.h"
|
#include "../../libs/qmuparser/qmuparser.h"
|
||||||
using namespace qmu;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The Calculator class for calculation formula.
|
* @brief The Calculator class for calculation formula.
|
||||||
|
@ -53,7 +52,7 @@ using namespace qmu;
|
||||||
* delete cal;//Here can be memory leak, but dialog already check this formula and probability very low.
|
* delete cal;//Here can be memory leak, but dialog already check this formula and probability very low.
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
class Calculator:public QmuParser
|
class Calculator:public qmu::QmuParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Calculator(const VContainer *data);
|
Calculator(const VContainer *data);
|
||||||
|
|
|
@ -263,9 +263,9 @@ const VDetail VContainer::GetDetail(quint32 id) const
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief AddPoint add new point to container
|
* @brief AddGObject add new GObject to container
|
||||||
* @param point new point
|
* @param obj new object
|
||||||
* @return return id of new point in container
|
* @return return id of new object in container
|
||||||
*/
|
*/
|
||||||
quint32 VContainer::AddGObject(VGObject *obj)
|
quint32 VContainer::AddGObject(VGObject *obj)
|
||||||
{
|
{
|
||||||
|
@ -287,9 +287,9 @@ quint32 VContainer::AddDetail(VDetail detail)
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief AddIncrement add new row of increment table
|
* @brief AddIncrement add new increment
|
||||||
* @param name name of new row of increment table
|
* @param name increment name
|
||||||
* @param row new row of increment table
|
* @param incr increment
|
||||||
*/
|
*/
|
||||||
void VContainer::AddIncrement(const QString &name, VIncrement incr)
|
void VContainer::AddIncrement(const QString &name, VIncrement incr)
|
||||||
{
|
{
|
||||||
|
@ -521,7 +521,6 @@ qreal VContainer::FindVar(const QString &name, bool *ok)const
|
||||||
* @brief AddLine add line to container
|
* @brief AddLine add line to container
|
||||||
* @param firstPointId id of first point of line
|
* @param firstPointId id of first point of line
|
||||||
* @param secondPointId id of second point of line
|
* @param secondPointId id of second point of line
|
||||||
* @param mode mode of line
|
|
||||||
*/
|
*/
|
||||||
void VContainer::AddLine(const quint32 &firstPointId, const quint32 &secondPointId)
|
void VContainer::AddLine(const quint32 &firstPointId, const quint32 &secondPointId)
|
||||||
{
|
{
|
||||||
|
@ -582,9 +581,9 @@ QString VContainer::GetNameLineAngle(const quint32 &firstPoint, const quint32 &s
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief UpdatePoint update point by id
|
* @brief UpdateGObject update GObject by id
|
||||||
* @param id id of existing point
|
* @param id id of existing GObject
|
||||||
* @param point point
|
* @param obj object
|
||||||
*/
|
*/
|
||||||
void VContainer::UpdateGObject(quint32 id, VGObject* obj)
|
void VContainer::UpdateGObject(quint32 id, VGObject* obj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,7 +116,6 @@ private:
|
||||||
* @brief NewItem add new object (point, arc, spline or spline path) to list
|
* @brief NewItem add new object (point, arc, spline or spline path) to list
|
||||||
* @param id id of object
|
* @param id id of object
|
||||||
* @param typeTool type of tool
|
* @param typeTool type of tool
|
||||||
* @param mode mode
|
|
||||||
* @param typeNode type of node in detail
|
* @param typeNode type of node in detail
|
||||||
* @param mx offset respect to x
|
* @param mx offset respect to x
|
||||||
* @param my offset respect to y
|
* @param my offset respect to y
|
||||||
|
|
|
@ -92,12 +92,12 @@ public:
|
||||||
void setP2Line2(const quint32 &value);
|
void setP2Line2(const quint32 &value);
|
||||||
/**
|
/**
|
||||||
* @brief getPointName return name of point
|
* @brief getPointName return name of point
|
||||||
* @return
|
* @return name of point
|
||||||
*/
|
*/
|
||||||
QString getPointName() const;
|
QString getPointName() const;
|
||||||
/**
|
/**
|
||||||
* @brief setPointName set name of point
|
* @brief setPointName set name of point
|
||||||
* @param value
|
* @param value name of point
|
||||||
*/
|
*/
|
||||||
void setPointName(const QString &value);
|
void setPointName(const QString &value);
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -424,7 +424,7 @@ quint32 DialogTool::getCurrentObjectId(QComboBox *box) const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -396,9 +396,9 @@ protected:
|
||||||
const quint32 &id,
|
const quint32 &id,
|
||||||
ComboMode::ComboBoxCutSpline cut = ComboMode::NoCutSpline) const;
|
ComboMode::ComboBoxCutSpline cut = ComboMode::NoCutSpline) const;
|
||||||
/**
|
/**
|
||||||
* @brief getCurrentPointId return current point id in combobox
|
* @brief getCurrentPointId return current point id stored in combobox
|
||||||
* @param box combobox
|
* @param box combobox
|
||||||
* @return id or -1 if combobox is empty
|
* @return id or 0 if combobox is empty
|
||||||
*/
|
*/
|
||||||
quint32 getCurrentObjectId(QComboBox *box) const;
|
quint32 getCurrentObjectId(QComboBox *box) const;
|
||||||
bool ChoosedPoint(const quint32 &id, QComboBox *box, const QString &toolTip);
|
bool ChoosedPoint(const quint32 &id, QComboBox *box, const QString &toolTip);
|
||||||
|
|
|
@ -95,3 +95,21 @@ QString VException::MoreInfo(const QString &detInfo) const
|
||||||
return detInfo;
|
return detInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
QString VException::DetailedInformation() const
|
||||||
|
{
|
||||||
|
return moreInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VException *VException::clone() const
|
||||||
|
{
|
||||||
|
return new VException(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VException::raise() const
|
||||||
|
{
|
||||||
|
throw *this;
|
||||||
|
}
|
||||||
|
|
|
@ -104,26 +104,13 @@ protected:
|
||||||
QString MoreInfo(const QString &detInfo) const;
|
QString MoreInfo(const QString &detInfo) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void VException::raise() const
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
{
|
|
||||||
throw *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline VException *VException::clone() const
|
|
||||||
{
|
|
||||||
return new VException(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QString VException::DetailedInformation() const
|
|
||||||
{
|
|
||||||
return moreInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QString VException::What() const
|
inline QString VException::What() const
|
||||||
{
|
{
|
||||||
return what;
|
return what;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
inline QString VException::MoreInformation() const
|
inline QString VException::MoreInformation() const
|
||||||
{
|
{
|
||||||
return moreInfo;
|
return moreInfo;
|
||||||
|
|
|
@ -197,14 +197,14 @@ void VDetail::NodeOnEdge(const quint32 &index, VNodeDetail &p1, VNodeDetail &p2)
|
||||||
qDebug()<<"Wrong edge index index ="<<index;
|
qDebug()<<"Wrong edge index index ="<<index;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
p1 = list.at(index);
|
p1 = list.at(static_cast<int>(index));
|
||||||
if (index + 1 > static_cast<quint32>(list.size()) - 1)
|
if (index + 1 > static_cast<quint32>(list.size()) - 1)
|
||||||
{
|
{
|
||||||
p2 = list.at(0);
|
p2 = list.at(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p2 = list.at(index+1);
|
p2 = list.at(static_cast<int>(index+1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ VDetail VDetail::RemoveEdge(const quint32 &index) const
|
||||||
{
|
{
|
||||||
if (i == index)
|
if (i == index)
|
||||||
{
|
{
|
||||||
det.append(this->at(k));
|
det.append(this->at(static_cast<int>(k)));
|
||||||
++k;
|
++k;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -50,10 +50,6 @@ VPointF::VPointF() :VGObject(GObject::Point, 0, Valentina::Calculation), _mx(0),
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
|
||||||
* @brief VPointF copy constructor
|
|
||||||
* @param point
|
|
||||||
*/
|
|
||||||
VPointF::VPointF(const VPointF &point) :VGObject(point), _mx(point.mx()), _my(point.my()), _x(point.x()), _y(point.y())
|
VPointF::VPointF(const VPointF &point) :VGObject(point), _mx(point.mx()), _my(point.my()), _x(point.x()), _y(point.y())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -61,7 +57,7 @@ VPointF::VPointF(const VPointF &point) :VGObject(point), _mx(point.mx()), _my(po
|
||||||
VPointF::VPointF(const QPointF &point) :VGObject(VPointF()), _mx(0), _my(0), _x(point.x()), _y(point.y())
|
VPointF::VPointF(const QPointF &point) :VGObject(VPointF()), _mx(0), _my(0), _x(point.x()), _y(point.y())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief operator = assignment operator
|
* @brief operator = assignment operator
|
||||||
* @param point point
|
* @param point point
|
||||||
|
|
|
@ -716,11 +716,6 @@ QVector<QPointF> VSpline::SplinePoints(const QPointF &p1, const QPointF &p4, qre
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
|
||||||
* @brief operator = assignmeant operator
|
|
||||||
* @param spl spline
|
|
||||||
* @return spline
|
|
||||||
*/
|
|
||||||
VSpline &VSpline::operator =(const VSpline &spline)
|
VSpline &VSpline::operator =(const VSpline &spline)
|
||||||
{
|
{
|
||||||
VGObject::operator=(spline);
|
VGObject::operator=(spline);
|
||||||
|
|
|
@ -212,6 +212,9 @@ QPointF VSplinePath::CutSplinePath(qreal length, qint32 &p1, qint32 &p2, QPointF
|
||||||
return QPointF();
|
return QPointF();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
QString VSplinePath::name() const{return _name;}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
qint32 VSplinePath::getMaxCountPoints() const
|
qint32 VSplinePath::getMaxCountPoints() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -184,7 +184,7 @@ public:
|
||||||
* @brief name return spline path name.
|
* @brief name return spline path name.
|
||||||
* @return name.
|
* @return name.
|
||||||
*/
|
*/
|
||||||
virtual QString name() const{return _name;}
|
virtual QString name() const;
|
||||||
/**
|
/**
|
||||||
* @brief getMaxCountPoints return max count of points what can have spline path. This method use tool union detail.
|
* @brief getMaxCountPoints return max count of points what can have spline path. This method use tool union detail.
|
||||||
* Because cutting point can change position spline can have diffirent count of points. Need know max value. This
|
* Because cutting point can change position spline can have diffirent count of points. Need know max value. This
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||||
{
|
{
|
||||||
// Why on earth didn't Qt want to make failed signal/slot connections qWarning?
|
// Why on earth didn't Qt want to make failed signal/slot connections qWarning?
|
||||||
if ((type == QtDebugMsg) && msg.contains("::connect"))
|
if ((type == QtDebugMsg) && msg.contains("::connect"))
|
||||||
|
|
|
@ -52,5 +52,7 @@
|
||||||
<file>icon/flags/uk.png</file>
|
<file>icon/flags/uk.png</file>
|
||||||
<file>icon/Graduation.png</file>
|
<file>icon/Graduation.png</file>
|
||||||
<file>icon/individual.png</file>
|
<file>icon/individual.png</file>
|
||||||
|
<file>icon/flags/nl.png</file>
|
||||||
|
<file>icon/flags/it.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -48,7 +48,7 @@ signals:
|
||||||
/**
|
/**
|
||||||
* @brief RefreshLine refresh control line.
|
* @brief RefreshLine refresh control line.
|
||||||
* @param indexSpline position spline in spline list.
|
* @param indexSpline position spline in spline list.
|
||||||
* @param position position point in spline.
|
* @param pos position point in spline.
|
||||||
* @param controlPoint new position control point.
|
* @param controlPoint new position control point.
|
||||||
* @param splinePoint new position spline point.
|
* @param splinePoint new position spline point.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -42,7 +42,6 @@ qreal VDrawTool::factor = 1;
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param parent parent object.
|
|
||||||
*/
|
*/
|
||||||
VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id)
|
VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id)
|
||||||
:VAbstractTool(doc, data, id), ignoreContextMenuEvent(false), ignoreFullUpdate(false),
|
:VAbstractTool(doc, data, id), ignoreContextMenuEvent(false), ignoreFullUpdate(false),
|
||||||
|
@ -162,6 +161,7 @@ qreal VDrawTool::CheckFormula(QString &formula, VContainer *data)
|
||||||
}
|
}
|
||||||
catch(qmu::QmuParserError &e)
|
catch(qmu::QmuParserError &e)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(e)
|
||||||
delete cal;
|
delete cal;
|
||||||
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data);
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data);
|
||||||
dialog->setFormula(formula);
|
dialog->setFormula(formula);
|
||||||
|
|
|
@ -72,7 +72,7 @@ public:
|
||||||
* @param _id tool id, 0 if tool doesn't exist yet.
|
* @param _id tool id, 0 if tool doesn't exist yet.
|
||||||
* @param pointName point name.
|
* @param pointName point name.
|
||||||
* @param formula string with formula length first splinePath.
|
* @param formula string with formula length first splinePath.
|
||||||
* @param splineId id splinePath in data container.
|
* @param splinePathId id of splinePath in data container.
|
||||||
* @param mx label bias x axis.
|
* @param mx label bias x axis.
|
||||||
* @param my label bias y axis.
|
* @param my label bias y axis.
|
||||||
* @param scene pointer to scene.
|
* @param scene pointer to scene.
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param radius string with formula radius arc.
|
* @param arcRadius string with formula radius arc.
|
||||||
* @param center id center arc point.
|
* @param center id center arc point.
|
||||||
* @param firstPointId id first line point.
|
* @param firstPointId id first line point.
|
||||||
* @param secondPointId id second line point.
|
* @param secondPointId id second line point.
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
/**
|
/**
|
||||||
* @brief FindPoint return point intersection line and arc.
|
* @brief FindPoint return point intersection line and arc.
|
||||||
* @param radius string with formula radius arc.
|
* @param arcRadius string with formula radius arc.
|
||||||
* @param center center arc point.
|
* @param center center arc point.
|
||||||
* @param firstPoint first line point.
|
* @param firstPoint first line point.
|
||||||
* @param secondPoint second line point.
|
* @param secondPoint second line point.
|
||||||
|
@ -78,7 +78,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* @brief Create help create tool.
|
* @brief Create help create tool.
|
||||||
* @param _id tool id, 0 if tool doesn't exist yet.
|
* @param _id tool id, 0 if tool doesn't exist yet.
|
||||||
* @param radius string with formula radius arc.
|
* @param arcRadius string with formula radius arc.
|
||||||
* @param center id center arc point.
|
* @param center id center arc point.
|
||||||
* @param firstPointId id first line point.
|
* @param firstPointId id first line point.
|
||||||
* @param secondPointId id second line point.
|
* @param secondPointId id second line point.
|
||||||
|
|
|
@ -78,7 +78,7 @@ signals:
|
||||||
/**
|
/**
|
||||||
* @brief RefreshLine refresh control line.
|
* @brief RefreshLine refresh control line.
|
||||||
* @param indexSpline position spline in spline list.
|
* @param indexSpline position spline in spline list.
|
||||||
* @param position position point in spline.
|
* @param pos position point in spline.
|
||||||
* @param controlPoint new position control point.
|
* @param controlPoint new position control point.
|
||||||
* @param splinePoint new position spline point.
|
* @param splinePoint new position spline point.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -43,7 +43,8 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerNode.
|
* @param idNode object id in containerNode.
|
||||||
|
* @param idTool id tool.
|
||||||
* @param parent parent object.
|
* @param parent parent object.
|
||||||
*/
|
*/
|
||||||
VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode,
|
VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode,
|
||||||
|
|
|
@ -44,8 +44,10 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerArc.
|
* @param idArc object id in containerArc.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
|
* @param idTool tool id.
|
||||||
|
* @param qoParent QObject parent
|
||||||
* @param parent parent object.
|
* @param parent parent object.
|
||||||
*/
|
*/
|
||||||
VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc,
|
VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc,
|
||||||
|
@ -56,9 +58,11 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerArc.
|
* @param idArc object id in containerArc.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
|
* @param idTool tool id.
|
||||||
|
* @param parent QObject parent
|
||||||
*/
|
*/
|
||||||
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document::Documents &parse,
|
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document::Documents &parse,
|
||||||
const Valentina::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr);
|
const Valentina::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr);
|
||||||
|
|
|
@ -44,8 +44,10 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerPoint.
|
* @param idPoint object id in containerPoint.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
|
* @param idTool tool id.
|
||||||
|
* @param qoParent QObject parent
|
||||||
* @param parent parent object.
|
* @param parent parent object.
|
||||||
*/
|
*/
|
||||||
VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Valentina::Sources &typeCreation,
|
VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Valentina::Sources &typeCreation,
|
||||||
|
@ -55,9 +57,11 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerPoint.
|
* @param idPoint object id in containerPoint.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
|
* @param idTool tool id.
|
||||||
|
* @param parent QObject parent
|
||||||
*/
|
*/
|
||||||
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Document::Documents &parse,
|
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Document::Documents &parse,
|
||||||
const Valentina::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr);
|
const Valentina::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr);
|
||||||
|
|
|
@ -44,9 +44,11 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerSpline.
|
* @param idSpline object id in containerSpline.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param parent parent object.
|
* @param idTool id node.
|
||||||
|
* @param qoParent QObject parent.
|
||||||
|
* @param parent QGraphicsItem parent.
|
||||||
*/
|
*/
|
||||||
VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Valentina::Sources &typeCreation,
|
VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Valentina::Sources &typeCreation,
|
||||||
const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr);
|
const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr);
|
||||||
|
@ -55,10 +57,11 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerSpline.
|
* @param idSpline object id in containerSpline.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @return
|
* @param idTool id node.
|
||||||
|
* @return pointer to node.
|
||||||
*/
|
*/
|
||||||
static VNodeSpline *Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
static VNodeSpline *Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
||||||
const Document::Documents &parse, const Valentina::Sources &typeCreation,
|
const Document::Documents &parse, const Valentina::Sources &typeCreation,
|
||||||
|
|
|
@ -44,8 +44,10 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerSpline.
|
* @param idSpline object id in containerSpline.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
|
* @param idTool tool id.
|
||||||
|
* @param qoParent QObject parent.
|
||||||
* @param parent parent object.
|
* @param parent parent object.
|
||||||
*/
|
*/
|
||||||
VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
||||||
|
@ -56,9 +58,11 @@ public:
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
* @param id object id in containerSpline.
|
* @param idSpline object id in containerSpline.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
|
* @param idTool tool id.
|
||||||
|
* @param parent QObject parent.
|
||||||
*/
|
*/
|
||||||
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Document::Documents &parse,
|
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Document::Documents &parse,
|
||||||
const Valentina::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = 0);
|
const Valentina::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = 0);
|
||||||
|
|
|
@ -76,18 +76,9 @@ public:
|
||||||
/**
|
/**
|
||||||
* @brief ClosestPoint find point projection of point onto line.
|
* @brief ClosestPoint find point projection of point onto line.
|
||||||
* @param line line.
|
* @param line line.
|
||||||
* @param p point.
|
|
||||||
* @return point on line or extended line if origin size too small.
|
* @return point on line or extended line if origin size too small.
|
||||||
*/
|
*/
|
||||||
static QPointF ClosestPoint(const QLineF &line, const QPointF &point);
|
static QPointF ClosestPoint(const QLineF &line, const QPointF &point);
|
||||||
/**
|
|
||||||
* @brief addVector
|
|
||||||
* @param p
|
|
||||||
* @param p1
|
|
||||||
* @param p2
|
|
||||||
* @param k
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k);
|
static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k);
|
||||||
/**
|
/**
|
||||||
* @brief getId return object id.
|
* @brief getId return object id.
|
||||||
|
@ -143,7 +134,7 @@ public:
|
||||||
static const QString TypeLineDashDotDotLine;
|
static const QString TypeLineDashDotDotLine;
|
||||||
/**
|
/**
|
||||||
* @brief Styles return list of all line styles.
|
* @brief Styles return list of all line styles.
|
||||||
* @return
|
* @return list of all line styles.
|
||||||
*/
|
*/
|
||||||
static const QStringList Styles();
|
static const QStringList Styles();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -133,7 +133,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
|
||||||
|
|
||||||
VPointF *p1 = new VPointF(spline->GetP1());
|
VPointF *p1 = new VPointF(spline->GetP1());
|
||||||
BiasRotatePoint(p1, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(), angle);
|
BiasRotatePoint(p1, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(), angle);
|
||||||
quint32 idP1 = data->AddGObject(p1);
|
//quint32 idP1 = data->AddGObject(p1);
|
||||||
|
|
||||||
VPointF p2 = VPointF(spline->GetP2());
|
VPointF p2 = VPointF(spline->GetP2());
|
||||||
BiasRotatePoint(&p2, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(), angle);
|
BiasRotatePoint(&p2, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(), angle);
|
||||||
|
@ -143,7 +143,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
|
||||||
|
|
||||||
VPointF *p4 = new VPointF(spline->GetP4());
|
VPointF *p4 = new VPointF(spline->GetP4());
|
||||||
BiasRotatePoint(p4, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(), angle);
|
BiasRotatePoint(p4, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(), angle);
|
||||||
quint32 idP4 = data->AddGObject(p4);
|
//quint32 idP4 = data->AddGObject(p4);
|
||||||
|
|
||||||
VSpline *spl = new VSpline(*p1, p2.toQPointF(), p3.toQPointF(), *p4, spline->GetKcurve(), 0,
|
VSpline *spl = new VSpline(*p1, p2.toQPointF(), p3.toQPointF(), *p4, spline->GetKcurve(), 0,
|
||||||
Valentina::Modeling);
|
Valentina::Modeling);
|
||||||
|
@ -177,7 +177,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
|
||||||
VPointF *p1 = new VPointF(spline.GetP1());
|
VPointF *p1 = new VPointF(spline.GetP1());
|
||||||
BiasRotatePoint(p1, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(),
|
BiasRotatePoint(p1, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(),
|
||||||
angle);
|
angle);
|
||||||
quint32 idP1 = data->AddGObject(p1);
|
//quint32 idP1 = data->AddGObject(p1);
|
||||||
--k;
|
--k;
|
||||||
|
|
||||||
VPointF p2 = VPointF(spline.GetP2());
|
VPointF p2 = VPointF(spline.GetP2());
|
||||||
|
@ -191,7 +191,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
|
||||||
VPointF *p4 = new VPointF(spline.GetP4());
|
VPointF *p4 = new VPointF(spline.GetP4());
|
||||||
BiasRotatePoint(p4, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(),
|
BiasRotatePoint(p4, dx, dy, data->GeometricObject<const VPointF *>(pRotate)->toQPointF(),
|
||||||
angle);
|
angle);
|
||||||
quint32 idP4 = data->AddGObject(p4);
|
//quint32 idP4 = data->AddGObject(p4);
|
||||||
--k;
|
--k;
|
||||||
|
|
||||||
VSpline spl = VSpline(*p1, p2.toQPointF(), p3.toQPointF(), *p4, spline.GetKcurve());
|
VSpline spl = VSpline(*p1, p2.toQPointF(), p3.toQPointF(), *p4, spline.GetKcurve());
|
||||||
|
@ -392,8 +392,8 @@ void VToolUnionDetails::Create(DialogTool *dialog, VMainGraphicsScene *scene, VP
|
||||||
Q_CHECK_PTR(dialogTool);
|
Q_CHECK_PTR(dialogTool);
|
||||||
VDetail d1 = data->GetDetail(dialogTool->getD1());
|
VDetail d1 = data->GetDetail(dialogTool->getD1());
|
||||||
VDetail d2 = data->GetDetail(dialogTool->getD2());
|
VDetail d2 = data->GetDetail(dialogTool->getD2());
|
||||||
ptrdiff_t indexD1 = dialogTool->getIndexD1();
|
quint32 indexD1 = static_cast<quint32>(dialogTool->getIndexD1());
|
||||||
ptrdiff_t indexD2 = dialogTool->getIndexD2();
|
quint32 indexD2 = static_cast<quint32>(dialogTool->getIndexD2());
|
||||||
Create(0, d1, d2, dialogTool->getD1(), dialogTool->getD2(), indexD1, indexD2, scene, doc, data, Document::FullParse,
|
Create(0, d1, d2, dialogTool->getD1(), dialogTool->getD2(), indexD1, indexD2, scene, doc, data, Document::FullParse,
|
||||||
Valentina::FromGui);
|
Valentina::FromGui);
|
||||||
}
|
}
|
||||||
|
@ -535,7 +535,7 @@ void VToolUnionDetails::Create(const quint32 _id, const VDetail &d1, const VDeta
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolUnionDetails::PointsOnEdge(const VDetail &d, const qint32 &index, VPointF &p1, VPointF &p2, VContainer *data)
|
void VToolUnionDetails::PointsOnEdge(const VDetail &d, const quint32 &index, VPointF &p1, VPointF &p2, VContainer *data)
|
||||||
{
|
{
|
||||||
VNodeDetail det2p1;
|
VNodeDetail det2p1;
|
||||||
VNodeDetail det2p2;
|
VNodeDetail det2p2;
|
||||||
|
@ -545,7 +545,7 @@ void VToolUnionDetails::PointsOnEdge(const VDetail &d, const qint32 &index, VPoi
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolUnionDetails::FindJ(const qint32 &pointsD2, const VDetail &d2, const qint32 &indexD2, qint32 &j)
|
void VToolUnionDetails::FindJ(const qint32 &pointsD2, const VDetail &d2, const quint32 &indexD2, qint32 &j)
|
||||||
{
|
{
|
||||||
if (pointsD2 == 0)
|
if (pointsD2 == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,8 +84,8 @@ public:
|
||||||
const quint32 &d2id, const quint32 &indexD1, const quint32 &indexD2, VMainGraphicsScene *scene,
|
const quint32 &d2id, const quint32 &indexD1, const quint32 &indexD2, VMainGraphicsScene *scene,
|
||||||
VPattern *doc, VContainer *data, const Document::Documents &parse,
|
VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||||
const Valentina::Sources &typeCreation);
|
const Valentina::Sources &typeCreation);
|
||||||
static void PointsOnEdge(const VDetail &d, const qint32 &index, VPointF &p1, VPointF &p2, VContainer *data);
|
static void PointsOnEdge(const VDetail &d, const quint32 &index, VPointF &p1, VPointF &p2, VContainer *data);
|
||||||
static void FindJ(const qint32 &pointsD2, const VDetail &d2, const qint32 &indexD2, qint32 &j);
|
static void FindJ(const qint32 &pointsD2, const VDetail &d2, const quint32 &indexD2, qint32 &j);
|
||||||
/**
|
/**
|
||||||
* @brief GetDetailFromFile parse detail from file.
|
* @brief GetDetailFromFile parse detail from file.
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param det detail what we union.
|
* @param det detail what we union.
|
||||||
* @param i index node in detail.
|
* @param i index node in detail.
|
||||||
* @param idCount
|
* @param idCount count updated or created objects.
|
||||||
* @param dx bias node x axis.
|
* @param dx bias node x axis.
|
||||||
* @param dy bias node y axis.
|
* @param dy bias node y axis.
|
||||||
* @param pRotate point rotation.
|
* @param pRotate point rotation.
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
**
|
**
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
extern const int MAJOR_VERSION = 0;
|
extern const int MAJOR_VERSION = 0;
|
||||||
|
|
|
@ -52,12 +52,12 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
/**
|
/**
|
||||||
* @brief scalingTime call each time when need handle scaling.
|
* @brief scalingTime call each time when need handle scaling.
|
||||||
* @param x
|
* @param x value from 0.0 to 1.0
|
||||||
*/
|
*/
|
||||||
void scalingTime(qreal x);
|
void scalingTime(qreal x);
|
||||||
/**
|
/**
|
||||||
* @brief scrollingTime call each time when need handle scrolling.
|
* @brief scrollingTime call each time when need handle scrolling.
|
||||||
* @param x
|
* @param x value from 0.0 to 1.0
|
||||||
*/
|
*/
|
||||||
void scrollingTime(qreal x);
|
void scrollingTime(qreal x);
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,15 +50,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
virtual void handleMessage(QtMsgType type, const QString &description,
|
virtual void handleMessage(QtMsgType type, const QString &description,
|
||||||
const QUrl &identifier, const QSourceLocation &sourceLocation)
|
const QUrl &identifier, const QSourceLocation &sourceLocation);
|
||||||
{
|
|
||||||
Q_UNUSED(type);
|
|
||||||
Q_UNUSED(identifier);
|
|
||||||
|
|
||||||
m_messageType = type;
|
|
||||||
m_description = description;
|
|
||||||
m_sourceLocation = sourceLocation;
|
|
||||||
}
|
|
||||||
private:
|
private:
|
||||||
QtMsgType m_messageType;
|
QtMsgType m_messageType;
|
||||||
QString m_description;
|
QString m_description;
|
||||||
|
@ -83,6 +75,18 @@ inline qint64 MessageHandler::column() const
|
||||||
return m_sourceLocation.column();
|
return m_sourceLocation.column();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void MessageHandler::handleMessage(QtMsgType type, const QString &description, const QUrl &identifier,
|
||||||
|
const QSourceLocation &sourceLocation)
|
||||||
|
{
|
||||||
|
Q_UNUSED(type);
|
||||||
|
Q_UNUSED(identifier);
|
||||||
|
|
||||||
|
m_messageType = type;
|
||||||
|
m_description = description;
|
||||||
|
m_sourceLocation = sourceLocation;
|
||||||
|
}
|
||||||
|
|
||||||
const QString VDomDocument::AttrId = QStringLiteral("id");
|
const QString VDomDocument::AttrId = QStringLiteral("id");
|
||||||
const QString VDomDocument::AttrUnit = QStringLiteral("unit");
|
const QString VDomDocument::AttrUnit = QStringLiteral("unit");
|
||||||
const QString VDomDocument::UnitMM = QStringLiteral("mm");
|
const QString VDomDocument::UnitMM = QStringLiteral("mm");
|
||||||
|
@ -95,6 +99,10 @@ VDomDocument::VDomDocument(VContainer *data)
|
||||||
: QDomDocument(), data(data), map(QHash<QString, QDomElement>())
|
: QDomDocument(), data(data), map(QHash<QString, QDomElement>())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VDomDocument::~VDomDocument()
|
||||||
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QDomElement VDomDocument::elementById(const QString& id)
|
QDomElement VDomDocument::elementById(const QString& id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,12 +78,9 @@ public:
|
||||||
static const QString TagVersion;
|
static const QString TagVersion;
|
||||||
/**
|
/**
|
||||||
* @param data container with variables
|
* @param data container with variables
|
||||||
* @param comboBoxDraws pointer to the ComboBox that will hold the pattern piece names
|
|
||||||
* @param mode draw mode
|
|
||||||
* @param parent
|
|
||||||
*/
|
*/
|
||||||
VDomDocument(VContainer *data);
|
VDomDocument(VContainer *data);
|
||||||
virtual ~VDomDocument(){}
|
virtual ~VDomDocument();
|
||||||
/**
|
/**
|
||||||
* @brief Finds an element by id.
|
* @brief Finds an element by id.
|
||||||
* @param id value id attribute.
|
* @param id value id attribute.
|
||||||
|
@ -142,10 +139,6 @@ public:
|
||||||
* @brief ValidateXML validate xml file by xsd schema.
|
* @brief ValidateXML validate xml file by xsd schema.
|
||||||
* @param schema path to schema file.
|
* @param schema path to schema file.
|
||||||
* @param fileName name of xml file.
|
* @param fileName name of xml file.
|
||||||
* @param errorMsg error message.
|
|
||||||
* @param errorLine number error line.
|
|
||||||
* @param errorColumn number error column.
|
|
||||||
* @return true if validation successful.
|
|
||||||
*/
|
*/
|
||||||
static void ValidateXML(const QString &schema, const QString &fileName);
|
static void ValidateXML(const QString &schema, const QString &fileName);
|
||||||
void setContent(const QString &fileName);
|
void setContent(const QString &fileName);
|
||||||
|
|
|
@ -43,6 +43,10 @@ const QString VIndividualMeasurements::SexFemale = QStringLiteral("female")
|
||||||
VIndividualMeasurements::VIndividualMeasurements(VContainer *data):VDomDocument(data)
|
VIndividualMeasurements::VIndividualMeasurements(VContainer *data):VDomDocument(data)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VIndividualMeasurements::~VIndividualMeasurements()
|
||||||
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
Valentina::Units VIndividualMeasurements::Unit() const
|
Valentina::Units VIndividualMeasurements::Unit() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,6 +47,7 @@ public:
|
||||||
Q_DECLARE_FLAGS(Genders, Sex)
|
Q_DECLARE_FLAGS(Genders, Sex)
|
||||||
|
|
||||||
VIndividualMeasurements(VContainer *data);
|
VIndividualMeasurements(VContainer *data);
|
||||||
|
virtual ~VIndividualMeasurements();
|
||||||
Valentina::Units Unit() const;
|
Valentina::Units Unit() const;
|
||||||
void setUnit(const Valentina::Units &unit);
|
void setUnit(const Valentina::Units &unit);
|
||||||
void Measurements();
|
void Measurements();
|
||||||
|
@ -73,6 +74,7 @@ public:
|
||||||
static QString GenderToStr(const VIndividualMeasurements::Genders &sex);
|
static QString GenderToStr(const VIndividualMeasurements::Genders &sex);
|
||||||
static VIndividualMeasurements::Genders StrToGender(const QString &sex);
|
static VIndividualMeasurements::Genders StrToGender(const QString &sex);
|
||||||
private:
|
private:
|
||||||
|
Q_DISABLE_COPY(VIndividualMeasurements)
|
||||||
void Measurement(const QString &tag);
|
void Measurement(const QString &tag);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ public:
|
||||||
VPattern(VContainer *data, QComboBox *comboBoxDraws, Valentina::Draws *mode, QObject *parent = nullptr);
|
VPattern(VContainer *data, QComboBox *comboBoxDraws, Valentina::Draws *mode, QObject *parent = nullptr);
|
||||||
/**
|
/**
|
||||||
* @brief CreateEmptyFile create minimal empty file.
|
* @brief CreateEmptyFile create minimal empty file.
|
||||||
* @param tablePath
|
* @param tablePath path to measurement file (standard or individual)
|
||||||
*/
|
*/
|
||||||
void CreateEmptyFile(const QString &tablePath);
|
void CreateEmptyFile(const QString &tablePath);
|
||||||
/**
|
/**
|
||||||
|
@ -333,7 +333,6 @@ private:
|
||||||
* @param domElement tag in xml tree.
|
* @param domElement tag in xml tree.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param type type of point.
|
* @param type type of point.
|
||||||
* @param mode draw mode.
|
|
||||||
*/
|
*/
|
||||||
void ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElement,
|
void ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElement,
|
||||||
const Document::Documents &parse, const QString &type);
|
const Document::Documents &parse, const QString &type);
|
||||||
|
@ -342,7 +341,6 @@ private:
|
||||||
* @param scene scene.
|
* @param scene scene.
|
||||||
* @param domElement tag in xml tree.
|
* @param domElement tag in xml tree.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param mode draw mode.
|
|
||||||
*/
|
*/
|
||||||
void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
|
void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
|
||||||
const Document::Documents &parse);
|
const Document::Documents &parse);
|
||||||
|
@ -352,7 +350,6 @@ private:
|
||||||
* @param domElement tag in xml tree.
|
* @param domElement tag in xml tree.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param type type of spline.
|
* @param type type of spline.
|
||||||
* @param mode draw mode.
|
|
||||||
*/
|
*/
|
||||||
void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
|
void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
|
||||||
const Document::Documents &parse, const QString& type);
|
const Document::Documents &parse, const QString& type);
|
||||||
|
@ -362,7 +359,6 @@ private:
|
||||||
* @param domElement tag in xml tree.
|
* @param domElement tag in xml tree.
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param type type of spline.
|
* @param type type of spline.
|
||||||
* @param mode draw mode.
|
|
||||||
*/
|
*/
|
||||||
void ParseArcElement(VMainGraphicsScene *scene, QDomElement &domElement,
|
void ParseArcElement(VMainGraphicsScene *scene, QDomElement &domElement,
|
||||||
const Document::Documents &parse, const QString& type);
|
const Document::Documents &parse, const QString& type);
|
||||||
|
|
|
@ -41,6 +41,10 @@ const QString VStandardMeasurements::AttrHeight_increase = QStringLiteral("heigh
|
||||||
VStandardMeasurements::VStandardMeasurements(VContainer *data):VDomDocument(data)
|
VStandardMeasurements::VStandardMeasurements(VContainer *data):VDomDocument(data)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VStandardMeasurements::~VStandardMeasurements()
|
||||||
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
Valentina::Units VStandardMeasurements::Unit()
|
Valentina::Units VStandardMeasurements::Unit()
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,7 @@ class VStandardMeasurements:public VDomDocument
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VStandardMeasurements(VContainer *data);
|
VStandardMeasurements(VContainer *data);
|
||||||
|
virtual ~VStandardMeasurements();
|
||||||
Valentina::Units Unit();
|
Valentina::Units Unit();
|
||||||
QString Description();
|
QString Description();
|
||||||
void Measurements();
|
void Measurements();
|
||||||
|
@ -56,6 +57,7 @@ public:
|
||||||
static const QString AttrSize_increase;
|
static const QString AttrSize_increase;
|
||||||
static const QString AttrHeight_increase;
|
static const QString AttrHeight_increase;
|
||||||
private:
|
private:
|
||||||
|
Q_DISABLE_COPY(VStandardMeasurements)
|
||||||
void Measurement(const QString &tag);
|
void Measurement(const QString &tag);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
* @brief Definition of the parser bytecode class.
|
* @brief Definition of the parser bytecode class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef Q_CC_CLANG
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wnested-anon-types"
|
||||||
|
#endif
|
||||||
namespace qmu
|
namespace qmu
|
||||||
{
|
{
|
||||||
struct SToken
|
struct SToken
|
||||||
|
@ -67,6 +71,9 @@ struct SToken
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef Q_CC_CLANG
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Bytecode implementation of the Math Parser.
|
* @brief Bytecode implementation of the Math Parser.
|
||||||
|
@ -97,7 +104,7 @@ public:
|
||||||
void Finalize();
|
void Finalize();
|
||||||
void clear();
|
void clear();
|
||||||
std::size_t GetMaxStackSize() const;
|
std::size_t GetMaxStackSize() const;
|
||||||
std::size_t GetSize() const;
|
int GetSize() const;
|
||||||
const SToken* GetBase() const;
|
const SToken* GetBase() const;
|
||||||
void AsciiDump();
|
void AsciiDump();
|
||||||
private:
|
private:
|
||||||
|
@ -138,7 +145,7 @@ inline std::size_t QmuParserByteCode::GetMaxStackSize() const
|
||||||
* @brief Returns the number of entries in the bytecode.
|
* @brief Returns the number of entries in the bytecode.
|
||||||
*/
|
*/
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
inline std::size_t QmuParserByteCode::GetSize() const
|
inline int QmuParserByteCode::GetSize() const
|
||||||
{
|
{
|
||||||
return m_vRPN.size();
|
return m_vRPN.size();
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,4 +239,23 @@ void QmuParserError::Reset()
|
||||||
m_iErrc = ecUNDEFINED;
|
m_iErrc = ecUNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief raise method raise for exception
|
||||||
|
*/
|
||||||
|
void qmu::QmuParserError::raise() const
|
||||||
|
{
|
||||||
|
throw *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief clone clone exception
|
||||||
|
* @return new exception
|
||||||
|
*/
|
||||||
|
QmuParserError *qmu::QmuParserError::clone() const
|
||||||
|
{
|
||||||
|
return new QmuParserError(*this);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace qmu
|
} // namespace qmu
|
||||||
|
|
|
@ -101,7 +101,7 @@ public:
|
||||||
~QmuParserErrorMsg();
|
~QmuParserErrorMsg();
|
||||||
|
|
||||||
static const QmuParserErrorMsg& Instance();
|
static const QmuParserErrorMsg& Instance();
|
||||||
QString operator[] ( unsigned a_iIdx ) const;
|
QString operator[] ( int a_iIdx ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(QmuParserErrorMsg)
|
Q_DISABLE_COPY(QmuParserErrorMsg)
|
||||||
|
@ -117,9 +117,9 @@ inline const QmuParserErrorMsg& QmuParserErrorMsg::Instance()
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
inline QString QmuParserErrorMsg::operator[] ( unsigned a_iIdx ) const
|
inline QString QmuParserErrorMsg::operator[] ( int a_iIdx ) const
|
||||||
{
|
{
|
||||||
return ( a_iIdx < static_cast<unsigned>( m_vErrMsg.size() ) ) ? m_vErrMsg[a_iIdx] : QString();
|
return ( a_iIdx < m_vErrMsg.size() ) ? m_vErrMsg[a_iIdx] : QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -163,25 +163,6 @@ private:
|
||||||
void Reset();
|
void Reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief raise method raise for exception
|
|
||||||
*/
|
|
||||||
inline void QmuParserError::raise() const
|
|
||||||
{
|
|
||||||
throw *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief clone clone exception
|
|
||||||
* @return new exception
|
|
||||||
*/
|
|
||||||
inline QmuParserError *QmuParserError::clone() const
|
|
||||||
{
|
|
||||||
return new QmuParserError(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief Set the expression related to this error.
|
* @brief Set the expression related to this error.
|
||||||
|
|
|
@ -38,9 +38,6 @@
|
||||||
|
|
||||||
#if defined __cplusplus
|
#if defined __cplusplus
|
||||||
/* Add C++ includes here */
|
/* Add C++ includes here */
|
||||||
#ifdef Q_CC_MSVC
|
|
||||||
#define _USE_MATH_DEFINES
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef QT_CORE_LIB
|
#ifdef QT_CORE_LIB
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user