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