diff --git a/autotests/kconfig_compiler/test1.h.ref b/autotests/kconfig_compiler/test1.h.ref --- a/autotests/kconfig_compiler/test1.h.ref +++ b/autotests/kconfig_compiler/test1.h.ref @@ -26,7 +26,7 @@ */ void setOneOption( bool v ) { - if (!isImmutable( QStringLiteral( "OneOption" ) )) + if (!isOneOptionImmutable()) mOneOption = v; } @@ -38,12 +38,20 @@ return mOneOption; } + /** + Is One option Immutable + */ + bool isOneOptionImmutable() const + { + return isImmutable( QStringLiteral( "OneOption" ) ); + } + /** Set Another option */ void setAnotherOption( int v ) { - if (!isImmutable( QStringLiteral( "AnotherOption" ) )) + if (!isAnotherOptionImmutable()) mAnotherOption = v; } @@ -55,12 +63,20 @@ return mAnotherOption; } + /** + Is Another option Immutable + */ + bool isAnotherOptionImmutable() const + { + return isImmutable( QStringLiteral( "AnotherOption" ) ); + } + /** Set This is some funky option */ void setListOption( int v ) { - if (!isImmutable( QStringLiteral( "ListOption" ) )) + if (!isListOptionImmutable()) mListOption = v; } @@ -72,12 +88,20 @@ return mListOption; } + /** + Is This is some funky option Immutable + */ + bool isListOptionImmutable() const + { + return isImmutable( QStringLiteral( "ListOption" ) ); + } + /** Set This is a string */ void setMyString( const QString & v ) { - if (!isImmutable( QStringLiteral( "MyString" ) )) + if (!isMyStringImmutable()) mMyString = v; } @@ -89,12 +113,20 @@ return mMyString; } + /** + Is This is a string Immutable + */ + bool isMyStringImmutable() const + { + return isImmutable( QStringLiteral( "MyString" ) ); + } + /** Set This is a path */ void setMyPath( const QString & v ) { - if (!isImmutable( QStringLiteral( "MyPath" ) )) + if (!isMyPathImmutable()) mMyPath = v; } @@ -106,12 +138,20 @@ return mMyPath; } + /** + Is This is a path Immutable + */ + bool isMyPathImmutable() const + { + return isImmutable( QStringLiteral( "MyPath" ) ); + } + /** Set Another option */ void setAnotherOption2( int v ) { - if (!isImmutable( QStringLiteral( "AnotherOption2" ) )) + if (!isAnotherOption2Immutable()) mAnotherOption2 = v; } @@ -123,12 +163,20 @@ return mAnotherOption2; } + /** + Is Another option Immutable + */ + bool isAnotherOption2Immutable() const + { + return isImmutable( QStringLiteral( "AnotherOption2" ) ); + } + /** Set MyStringList */ void setMyStringList( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "MyStringList" ) )) + if (!isMyStringListImmutable()) mMyStringList = v; } @@ -140,12 +188,20 @@ return mMyStringList; } + /** + Is MyStringList Immutable + */ + bool isMyStringListImmutable() const + { + return isImmutable( QStringLiteral( "MyStringList" ) ); + } + /** Set MyStringListHidden */ void setMyStringListHidden( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "MyStringListHidden" ) )) + if (!isMyStringListHiddenImmutable()) mMyStringListHidden = v; } @@ -157,12 +213,20 @@ return mMyStringListHidden; } + /** + Is MyStringListHidden Immutable + */ + bool isMyStringListHiddenImmutable() const + { + return isImmutable( QStringLiteral( "MyStringListHidden" ) ); + } + /** Set List Number */ void setMyNumber( int v ) { - if (!isImmutable( QStringLiteral( "MyNumber" ) )) + if (!isMyNumberImmutable()) mMyNumber = v; } @@ -174,6 +238,14 @@ return mMyNumber; } + /** + Is List Number Immutable + */ + bool isMyNumberImmutable() const + { + return isImmutable( QStringLiteral( "MyNumber" ) ); + } + protected: QString mParamtransport; QString mParamfolder; diff --git a/autotests/kconfig_compiler/test10.h.ref b/autotests/kconfig_compiler/test10.h.ref --- a/autotests/kconfig_compiler/test10.h.ref +++ b/autotests/kconfig_compiler/test10.h.ref @@ -23,6 +23,15 @@ return self()->mFooBar; } + /** + Is foo bar Immutable + */ + static + bool isFooBarImmutable() + { + return self()->isImmutable( QStringLiteral( "FooBar" ) ); + } + /** Get bar foo */ @@ -32,6 +41,15 @@ return self()->mBarFoo; } + /** + Is bar foo Immutable + */ + static + bool isBarFooImmutable() + { + return self()->isImmutable( QStringLiteral( "BarFoo" ) ); + } + protected: Test10(); friend class Test10Helper; diff --git a/autotests/kconfig_compiler/test11.h.ref b/autotests/kconfig_compiler/test11.h.ref --- a/autotests/kconfig_compiler/test11.h.ref +++ b/autotests/kconfig_compiler/test11.h.ref @@ -30,7 +30,7 @@ */ void setAutoSave( bool v ) { - if (!isImmutable( QStringLiteral( "AutoSave" ) )) + if (!isAutoSaveImmutable()) mAutoSave = v; } @@ -42,6 +42,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + /** Get Enable automatic saving of calendar default value */ @@ -63,7 +71,7 @@ */ void setAutoSaveInterval( int v ) { - if (!isImmutable( QStringLiteral( "AutoSaveInterval" ) )) + if (!isAutoSaveIntervalImmutable()) mAutoSaveInterval = v; } @@ -75,6 +83,14 @@ return mAutoSaveInterval; } + /** + Is Auto Save Interval Immutable + */ + bool isAutoSaveIntervalImmutable() const + { + return isImmutable( QStringLiteral( "AutoSaveInterval" ) ); + } + /** Get Auto Save Interval default value */ @@ -96,7 +112,7 @@ */ void setConfirm( bool v ) { - if (!isImmutable( QStringLiteral( "Confirm" ) )) + if (!isConfirmImmutable()) mConfirm = v; } @@ -108,6 +124,14 @@ return mConfirm; } + /** + Is Confirm deletes Immutable + */ + bool isConfirmImmutable() const + { + return isImmutable( QStringLiteral( "Confirm" ) ); + } + /** Get Confirm deletes default value */ @@ -129,7 +153,7 @@ */ void setArchiveFile( const QString & v ) { - if (!isImmutable( QStringLiteral( "ArchiveFile" ) )) + if (!isArchiveFileImmutable()) mArchiveFile = v; } @@ -141,6 +165,14 @@ return mArchiveFile; } + /** + Is Archive File Immutable + */ + bool isArchiveFileImmutable() const + { + return isImmutable( QStringLiteral( "ArchiveFile" ) ); + } + /** Get Item object corresponding to ArchiveFile() */ @@ -154,7 +186,7 @@ */ void setDestination( EnumDestination::type v ) { - if (!isImmutable( QStringLiteral( "Destination" ) )) + if (!isDestinationImmutable()) mDestination = v; } @@ -166,6 +198,14 @@ return static_cast(mDestination); } + /** + Is New Events/Todos Should Immutable + */ + bool isDestinationImmutable() const + { + return isImmutable( QStringLiteral( "Destination" ) ); + } + /** Get New Events/Todos Should default value */ @@ -187,7 +227,7 @@ */ void setHourSize( int v ) { - if (!isImmutable( QStringLiteral( "HourSize" ) )) + if (!isHourSizeImmutable()) mHourSize = v; } @@ -199,6 +239,14 @@ return mHourSize; } + /** + Is Hour Size Immutable + */ + bool isHourSizeImmutable() const + { + return isImmutable( QStringLiteral( "HourSize" ) ); + } + /** Get Hour Size default value */ @@ -220,7 +268,7 @@ */ void setSelectionStartsEditor( bool v ) { - if (!isImmutable( QStringLiteral( "SelectionStartsEditor" ) )) + if (!isSelectionStartsEditorImmutable()) mSelectionStartsEditor = v; } @@ -232,6 +280,14 @@ return mSelectionStartsEditor; } + /** + Is Time range selection in agenda view starts event editor Immutable + */ + bool isSelectionStartsEditorImmutable() const + { + return isImmutable( QStringLiteral( "SelectionStartsEditor" ) ); + } + /** Get Time range selection in agenda view starts event editor default value */ @@ -253,7 +309,7 @@ */ void setSelectedPlugins( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "SelectedPlugins" ) )) + if (!isSelectedPluginsImmutable()) mSelectedPlugins = v; } @@ -265,6 +321,14 @@ return mSelectedPlugins; } + /** + Is SelectedPlugins Immutable + */ + bool isSelectedPluginsImmutable() const + { + return isImmutable( QStringLiteral( "SelectedPlugins" ) ); + } + /** Get SelectedPlugins default value */ @@ -286,7 +350,7 @@ */ void setHighlightColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "HighlightColor" ) )) + if (!isHighlightColorImmutable()) mHighlightColor = v; } @@ -298,6 +362,14 @@ return mHighlightColor; } + /** + Is Highlight color Immutable + */ + bool isHighlightColorImmutable() const + { + return isImmutable( QStringLiteral( "HighlightColor" ) ); + } + /** Get Highlight color default value */ @@ -319,7 +391,7 @@ */ void setAgendaBgColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "AgendaBgColor" ) )) + if (!isAgendaBgColorImmutable()) mAgendaBgColor = v; } @@ -331,6 +403,14 @@ return mAgendaBgColor; } + /** + Is Agenda view background color Immutable + */ + bool isAgendaBgColorImmutable() const + { + return isImmutable( QStringLiteral( "AgendaBgColor" ) ); + } + /** Get Agenda view background color default value */ @@ -352,7 +432,7 @@ */ void setTimeBarFont( const QFont & v ) { - if (!isImmutable( QStringLiteral( "TimeBarFont" ) )) + if (!isTimeBarFontImmutable()) mTimeBarFont = v; } @@ -364,6 +444,14 @@ return mTimeBarFont; } + /** + Is Time bar Immutable + */ + bool isTimeBarFontImmutable() const + { + return isImmutable( QStringLiteral( "TimeBarFont" ) ); + } + /** Get Item object corresponding to TimeBarFont() */ @@ -377,7 +465,7 @@ */ void setEmailClient( MailClient v ) { - if (!isImmutable( QStringLiteral( "EmailClient" ) )) + if (!isEmailClientImmutable()) mEmailClient = v; } @@ -389,6 +477,14 @@ return static_cast(mEmailClient); } + /** + Is Email client Immutable + */ + bool isEmailClientImmutable() const + { + return isImmutable( QStringLiteral( "EmailClient" ) ); + } + /** Get Email client default value */ @@ -410,7 +506,7 @@ */ void setDefaultReminderUnits( TimePeriod::Units v ) { - if (!isImmutable( QStringLiteral( "DefaultReminderUnits" ) )) + if (!isDefaultReminderUnitsImmutable()) mDefaultReminderUnits = v; } @@ -422,6 +518,14 @@ return static_cast(mDefaultReminderUnits); } + /** + Is Reminder units Immutable + */ + bool isDefaultReminderUnitsImmutable() const + { + return isImmutable( QStringLiteral( "DefaultReminderUnits" ) ); + } + /** Get Reminder units default value */ @@ -443,7 +547,7 @@ */ void setQueueRate( int i, const QList & v ) { - if (!isImmutable( QStringLiteral( "queueRate%1" ).arg( i ) )) + if (!isQueueRateImmutable( i )) mQueueRate[i] = v; } @@ -455,6 +559,14 @@ return mQueueRate[i]; } + /** + Is EmptyingRate $(QueueIndex) Immutable + */ + bool isQueueRateImmutable( int i ) const + { + return isImmutable( QStringLiteral( "queueRate%1" ).arg( i ) ); + } + /** Get EmptyingRate $(QueueIndex) default value */ @@ -476,7 +588,7 @@ */ void setShowQueueTuner( bool v ) { - if (!isImmutable( QStringLiteral( "ShowQueueTuner" ) )) + if (!isShowQueueTunerImmutable()) mShowQueueTuner = v; } @@ -488,6 +600,14 @@ return mShowQueueTuner; } + /** + Is ShowQueueTuner Immutable + */ + bool isShowQueueTunerImmutable() const + { + return isImmutable( QStringLiteral( "ShowQueueTuner" ) ); + } + /** Get ShowQueueTuner default value */ diff --git a/autotests/kconfig_compiler/test11a.h.ref b/autotests/kconfig_compiler/test11a.h.ref --- a/autotests/kconfig_compiler/test11a.h.ref +++ b/autotests/kconfig_compiler/test11a.h.ref @@ -30,7 +30,7 @@ */ void setAutoSave( bool v ) { - if (!isImmutable( QStringLiteral( "AutoSave" ) )) + if (!isAutoSaveImmutable()) mAutoSave = v; } @@ -42,6 +42,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + /** Get Item object corresponding to AutoSave() */ @@ -55,7 +63,7 @@ */ void setAutoSaveInterval( int v ) { - if (!isImmutable( QStringLiteral( "AutoSaveInterval" ) )) + if (!isAutoSaveIntervalImmutable()) mAutoSaveInterval = v; } @@ -67,6 +75,14 @@ return mAutoSaveInterval; } + /** + Is Auto Save Interval Immutable + */ + bool isAutoSaveIntervalImmutable() const + { + return isImmutable( QStringLiteral( "AutoSaveInterval" ) ); + } + /** Get Item object corresponding to AutoSaveInterval() */ @@ -80,7 +96,7 @@ */ void setConfirm( bool v ) { - if (!isImmutable( QStringLiteral( "Confirm" ) )) + if (!isConfirmImmutable()) mConfirm = v; } @@ -92,6 +108,14 @@ return mConfirm; } + /** + Is Confirm deletes Immutable + */ + bool isConfirmImmutable() const + { + return isImmutable( QStringLiteral( "Confirm" ) ); + } + /** Get Item object corresponding to Confirm() */ @@ -105,7 +129,7 @@ */ void setArchiveFile( const QString & v ) { - if (!isImmutable( QStringLiteral( "ArchiveFile" ) )) + if (!isArchiveFileImmutable()) mArchiveFile = v; } @@ -117,6 +141,14 @@ return mArchiveFile; } + /** + Is Archive File Immutable + */ + bool isArchiveFileImmutable() const + { + return isImmutable( QStringLiteral( "ArchiveFile" ) ); + } + /** Get Item object corresponding to ArchiveFile() */ @@ -130,7 +162,7 @@ */ void setDestination( EnumDestination::type v ) { - if (!isImmutable( QStringLiteral( "Destination" ) )) + if (!isDestinationImmutable()) mDestination = v; } @@ -142,6 +174,14 @@ return static_cast(mDestination); } + /** + Is New Events/Todos Should Immutable + */ + bool isDestinationImmutable() const + { + return isImmutable( QStringLiteral( "Destination" ) ); + } + /** Get New Events/Todos Should default value */ @@ -163,7 +203,7 @@ */ void setHourSize( int v ) { - if (!isImmutable( QStringLiteral( "HourSize" ) )) + if (!isHourSizeImmutable()) mHourSize = v; } @@ -175,6 +215,14 @@ return mHourSize; } + /** + Is Hour Size Immutable + */ + bool isHourSizeImmutable() const + { + return isImmutable( QStringLiteral( "HourSize" ) ); + } + /** Get Item object corresponding to HourSize() */ @@ -188,7 +236,7 @@ */ void setSelectionStartsEditor( bool v ) { - if (!isImmutable( QStringLiteral( "SelectionStartsEditor" ) )) + if (!isSelectionStartsEditorImmutable()) mSelectionStartsEditor = v; } @@ -200,6 +248,14 @@ return mSelectionStartsEditor; } + /** + Is Time range selection in agenda view starts event editor Immutable + */ + bool isSelectionStartsEditorImmutable() const + { + return isImmutable( QStringLiteral( "SelectionStartsEditor" ) ); + } + /** Get Time range selection in agenda view starts event editor default value */ @@ -221,7 +277,7 @@ */ void setSelectedPlugins( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "SelectedPlugins" ) )) + if (!isSelectedPluginsImmutable()) mSelectedPlugins = v; } @@ -233,6 +289,14 @@ return mSelectedPlugins; } + /** + Is SelectedPlugins Immutable + */ + bool isSelectedPluginsImmutable() const + { + return isImmutable( QStringLiteral( "SelectedPlugins" ) ); + } + /** Get Item object corresponding to SelectedPlugins() */ @@ -246,7 +310,7 @@ */ void setHighlightColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "HighlightColor" ) )) + if (!isHighlightColorImmutable()) mHighlightColor = v; } @@ -258,6 +322,14 @@ return mHighlightColor; } + /** + Is Highlight color Immutable + */ + bool isHighlightColorImmutable() const + { + return isImmutable( QStringLiteral( "HighlightColor" ) ); + } + /** Get Item object corresponding to HighlightColor() */ @@ -271,7 +343,7 @@ */ void setAgendaBgColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "AgendaBgColor" ) )) + if (!isAgendaBgColorImmutable()) mAgendaBgColor = v; } @@ -283,6 +355,14 @@ return mAgendaBgColor; } + /** + Is Agenda view background color Immutable + */ + bool isAgendaBgColorImmutable() const + { + return isImmutable( QStringLiteral( "AgendaBgColor" ) ); + } + /** Get Item object corresponding to AgendaBgColor() */ @@ -296,7 +376,7 @@ */ void setTimeBarFont( const QFont & v ) { - if (!isImmutable( QStringLiteral( "TimeBarFont" ) )) + if (!isTimeBarFontImmutable()) mTimeBarFont = v; } @@ -308,6 +388,14 @@ return mTimeBarFont; } + /** + Is Time bar Immutable + */ + bool isTimeBarFontImmutable() const + { + return isImmutable( QStringLiteral( "TimeBarFont" ) ); + } + /** Get Item object corresponding to TimeBarFont() */ @@ -321,7 +409,7 @@ */ void setEmailClient( MailClient v ) { - if (!isImmutable( QStringLiteral( "EmailClient" ) )) + if (!isEmailClientImmutable()) mEmailClient = v; } @@ -333,6 +421,14 @@ return static_cast(mEmailClient); } + /** + Is Email client Immutable + */ + bool isEmailClientImmutable() const + { + return isImmutable( QStringLiteral( "EmailClient" ) ); + } + /** Get Item object corresponding to EmailClient() */ @@ -346,7 +442,7 @@ */ void setDefaultReminderUnits( TimePeriod::Units v ) { - if (!isImmutable( QStringLiteral( "DefaultReminderUnits" ) )) + if (!isDefaultReminderUnitsImmutable()) mDefaultReminderUnits = v; } @@ -358,6 +454,14 @@ return static_cast(mDefaultReminderUnits); } + /** + Is Reminder units Immutable + */ + bool isDefaultReminderUnitsImmutable() const + { + return isImmutable( QStringLiteral( "DefaultReminderUnits" ) ); + } + /** Get Reminder units default value */ @@ -379,7 +483,7 @@ */ void setQueueRate( int i, const QList & v ) { - if (!isImmutable( QStringLiteral( "queueRate%1" ).arg( i ) )) + if (!isQueueRateImmutable( i )) mQueueRate[i] = v; } @@ -391,6 +495,14 @@ return mQueueRate[i]; } + /** + Is EmptyingRate $(QueueIndex) Immutable + */ + bool isQueueRateImmutable( int i ) const + { + return isImmutable( QStringLiteral( "queueRate%1" ).arg( i ) ); + } + /** Get Item object corresponding to queueRate() */ @@ -404,7 +516,7 @@ */ void setShowQueueTuner( bool v ) { - if (!isImmutable( QStringLiteral( "ShowQueueTuner" ) )) + if (!isShowQueueTunerImmutable()) mShowQueueTuner = v; } @@ -416,6 +528,14 @@ return mShowQueueTuner; } + /** + Is ShowQueueTuner Immutable + */ + bool isShowQueueTunerImmutable() const + { + return isImmutable( QStringLiteral( "ShowQueueTuner" ) ); + } + /** Get Item object corresponding to ShowQueueTuner() */ diff --git a/autotests/kconfig_compiler/test12.h.ref b/autotests/kconfig_compiler/test12.h.ref --- a/autotests/kconfig_compiler/test12.h.ref +++ b/autotests/kconfig_compiler/test12.h.ref @@ -23,6 +23,14 @@ return mRnRSource; } + /** + Is RnRSource Immutable + */ + bool isRnRSourceImmutable() const + { + return isImmutable( QStringLiteral( "RnRSource" ) ); + } + protected: // muon diff --git a/autotests/kconfig_compiler/test13.h.ref b/autotests/kconfig_compiler/test13.h.ref --- a/autotests/kconfig_compiler/test13.h.ref +++ b/autotests/kconfig_compiler/test13.h.ref @@ -17,43 +17,70 @@ ~Test13(); Q_PROPERTY(QUrl picturesDir READ picturesDir CONSTANT) + Q_PROPERTY(bool isPicturesDirImmutable CONSTANT) /** Get picturesDir */ QUrl picturesDir() const { return mPicturesDir; } + /** + Is picturesDir Immutable + */ + bool isPicturesDirImmutable() const + { + return isImmutable( QStringLiteral( "picturesDir" ) ); + } + /** Set brightness */ void setBrightness( double v ) { - if (v != mBrightness && !isImmutable( QStringLiteral( "brightness" ) )) { + if (v != mBrightness && !isBrightnessImmutable()) { mBrightness = v; Q_EMIT brightnessChanged(); } } Q_PROPERTY(double brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged) + Q_PROPERTY(bool isBrightnessImmutable CONSTANT) /** Get brightness */ double brightness() const { return mBrightness; } + /** + Is brightness Immutable + */ + bool isBrightnessImmutable() const + { + return isImmutable( QStringLiteral( "brightness" ) ); + } + Q_PROPERTY(bool startsWithUppercase READ startsWithUppercase CONSTANT) + Q_PROPERTY(bool isStartsWithUppercaseImmutable CONSTANT) /** Get StartsWithUppercase */ bool startsWithUppercase() const { return mStartsWithUppercase; } + /** + Is StartsWithUppercase Immutable + */ + bool isStartsWithUppercaseImmutable() const + { + return isImmutable( QStringLiteral( "StartsWithUppercase" ) ); + } + enum { signalBrightnessChanged = 0x1 diff --git a/autotests/kconfig_compiler/test2.h.ref b/autotests/kconfig_compiler/test2.h.ref --- a/autotests/kconfig_compiler/test2.h.ref +++ b/autotests/kconfig_compiler/test2.h.ref @@ -23,7 +23,7 @@ */ void setAutoSave( bool v ) { - if (!isImmutable( QStringLiteral( "AutoSave" ) )) + if (!isAutoSaveImmutable()) mAutoSave = v; } @@ -35,6 +35,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + /** Get Item object corresponding to AutoSave() */ @@ -48,7 +56,7 @@ */ void setAutoSaveInterval( int v ) { - if (!isImmutable( QStringLiteral( "AutoSaveInterval" ) )) + if (!isAutoSaveIntervalImmutable()) mAutoSaveInterval = v; } @@ -60,6 +68,14 @@ return mAutoSaveInterval; } + /** + Is Auto Save Interval Immutable + */ + bool isAutoSaveIntervalImmutable() const + { + return isImmutable( QStringLiteral( "AutoSaveInterval" ) ); + } + /** Get Item object corresponding to AutoSaveInterval() */ @@ -73,7 +89,7 @@ */ void setConfirm( bool v ) { - if (!isImmutable( QStringLiteral( "Confirm" ) )) + if (!isConfirmImmutable()) mConfirm = v; } @@ -85,6 +101,14 @@ return mConfirm; } + /** + Is Confirm deletes Immutable + */ + bool isConfirmImmutable() const + { + return isImmutable( QStringLiteral( "Confirm" ) ); + } + /** Get Item object corresponding to Confirm() */ @@ -98,7 +122,7 @@ */ void setArchiveFile( const QString & v ) { - if (!isImmutable( QStringLiteral( "ArchiveFile" ) )) + if (!isArchiveFileImmutable()) mArchiveFile = v; } @@ -110,6 +134,14 @@ return mArchiveFile; } + /** + Is Archive File Immutable + */ + bool isArchiveFileImmutable() const + { + return isImmutable( QStringLiteral( "ArchiveFile" ) ); + } + /** Get Item object corresponding to ArchiveFile() */ @@ -123,7 +155,7 @@ */ void setDestination( int v ) { - if (!isImmutable( QStringLiteral( "Destination" ) )) + if (!isDestinationImmutable()) mDestination = v; } @@ -135,6 +167,14 @@ return mDestination; } + /** + Is New Events/Todos Should Immutable + */ + bool isDestinationImmutable() const + { + return isImmutable( QStringLiteral( "Destination" ) ); + } + /** Get Item object corresponding to Destination() */ @@ -148,7 +188,7 @@ */ void setHourSize( int v ) { - if (!isImmutable( QStringLiteral( "HourSize" ) )) + if (!isHourSizeImmutable()) mHourSize = v; } @@ -160,6 +200,14 @@ return mHourSize; } + /** + Is Hour Size Immutable + */ + bool isHourSizeImmutable() const + { + return isImmutable( QStringLiteral( "HourSize" ) ); + } + /** Get Item object corresponding to HourSize() */ @@ -173,7 +221,7 @@ */ void setSelectionStartsEditor( bool v ) { - if (!isImmutable( QStringLiteral( "SelectionStartsEditor" ) )) + if (!isSelectionStartsEditorImmutable()) mSelectionStartsEditor = v; } @@ -185,6 +233,14 @@ return mSelectionStartsEditor; } + /** + Is Time range selection in agenda view starts event editor Immutable + */ + bool isSelectionStartsEditorImmutable() const + { + return isImmutable( QStringLiteral( "SelectionStartsEditor" ) ); + } + /** Get Item object corresponding to SelectionStartsEditor() */ @@ -198,7 +254,7 @@ */ void setSelectedPlugins( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "SelectedPlugins" ) )) + if (!isSelectedPluginsImmutable()) mSelectedPlugins = v; } @@ -210,6 +266,14 @@ return mSelectedPlugins; } + /** + Is SelectedPlugins Immutable + */ + bool isSelectedPluginsImmutable() const + { + return isImmutable( QStringLiteral( "SelectedPlugins" ) ); + } + /** Get Item object corresponding to SelectedPlugins() */ @@ -223,7 +287,7 @@ */ void setHighlightColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "HighlightColor" ) )) + if (!isHighlightColorImmutable()) mHighlightColor = v; } @@ -235,6 +299,14 @@ return mHighlightColor; } + /** + Is Highlight color Immutable + */ + bool isHighlightColorImmutable() const + { + return isImmutable( QStringLiteral( "HighlightColor" ) ); + } + /** Get Item object corresponding to HighlightColor() */ @@ -248,7 +320,7 @@ */ void setAgendaBgColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "AgendaBgColor" ) )) + if (!isAgendaBgColorImmutable()) mAgendaBgColor = v; } @@ -260,6 +332,14 @@ return mAgendaBgColor; } + /** + Is Agenda view background color Immutable + */ + bool isAgendaBgColorImmutable() const + { + return isImmutable( QStringLiteral( "AgendaBgColor" ) ); + } + /** Get Item object corresponding to AgendaBgColor() */ @@ -273,7 +353,7 @@ */ void setTimeBarFont( const QFont & v ) { - if (!isImmutable( QStringLiteral( "TimeBarFont" ) )) + if (!isTimeBarFontImmutable()) mTimeBarFont = v; } @@ -285,6 +365,14 @@ return mTimeBarFont; } + /** + Is Time bar Immutable + */ + bool isTimeBarFontImmutable() const + { + return isImmutable( QStringLiteral( "TimeBarFont" ) ); + } + /** Get Item object corresponding to TimeBarFont() */ diff --git a/autotests/kconfig_compiler/test3.h.ref b/autotests/kconfig_compiler/test3.h.ref --- a/autotests/kconfig_compiler/test3.h.ref +++ b/autotests/kconfig_compiler/test3.h.ref @@ -22,7 +22,7 @@ */ void setAutoSave( bool v ) { - if (!isImmutable( QStringLiteral( "AutoSave" ) )) + if (!isAutoSaveImmutable()) mAutoSave = v; } @@ -34,6 +34,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + /** Get Item object corresponding to AutoSave() */ @@ -47,7 +55,7 @@ */ void setBlubb( int v ) { - if (!isImmutable( QStringLiteral( "Blubb" ) )) + if (!isBlubbImmutable()) mBlubb = v; } @@ -59,6 +67,14 @@ return mBlubb; } + /** + Is Blubb Immutable + */ + bool isBlubbImmutable() const + { + return isImmutable( QStringLiteral( "Blubb" ) ); + } + /** Get Item object corresponding to Blubb() */ @@ -72,7 +88,7 @@ */ void setBlahBlah( const QString & v ) { - if (!isImmutable( QStringLiteral( "BlahBlah" ) )) + if (!isBlahBlahImmutable()) mBlahBlah = v; } @@ -84,6 +100,14 @@ return mBlahBlah; } + /** + Is BlahBlah Immutable + */ + bool isBlahBlahImmutable() const + { + return isImmutable( QStringLiteral( "BlahBlah" ) ); + } + /** Get Item object corresponding to BlahBlah() */ @@ -97,7 +121,7 @@ */ void setMyPassword( const QString & v ) { - if (!isImmutable( QStringLiteral( "MyPassword" ) )) + if (!isMyPasswordImmutable()) mMyPassword = v; } @@ -109,6 +133,14 @@ return mMyPassword; } + /** + Is MyPassword Immutable + */ + bool isMyPasswordImmutable() const + { + return isImmutable( QStringLiteral( "MyPassword" ) ); + } + /** Get Item object corresponding to MyPassword() */ diff --git a/autotests/kconfig_compiler/test3a.h.ref b/autotests/kconfig_compiler/test3a.h.ref --- a/autotests/kconfig_compiler/test3a.h.ref +++ b/autotests/kconfig_compiler/test3a.h.ref @@ -23,7 +23,7 @@ */ void setAutoSave( bool v ) { - if (!isImmutable( QStringLiteral( "AutoSave" ) )) + if (!isAutoSaveImmutable()) mAutoSave = v; } @@ -35,6 +35,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + /** Get Item object corresponding to AutoSave() */ @@ -48,7 +56,7 @@ */ void setBlubb( int v ) { - if (!isImmutable( QStringLiteral( "Blubb" ) )) + if (!isBlubbImmutable()) mBlubb = v; } @@ -60,6 +68,14 @@ return mBlubb; } + /** + Is Blubb Immutable + */ + bool isBlubbImmutable() const + { + return isImmutable( QStringLiteral( "Blubb" ) ); + } + /** Get Item object corresponding to Blubb() */ @@ -73,7 +89,7 @@ */ void setBlahBlah( const QString & v ) { - if (!isImmutable( QStringLiteral( "BlahBlah" ) )) + if (!isBlahBlahImmutable()) mBlahBlah = v; } @@ -85,6 +101,14 @@ return mBlahBlah; } + /** + Is BlahBlah Immutable + */ + bool isBlahBlahImmutable() const + { + return isImmutable( QStringLiteral( "BlahBlah" ) ); + } + /** Get Item object corresponding to BlahBlah() */ @@ -98,7 +122,7 @@ */ void setMyPassword( const QString & v ) { - if (!isImmutable( QStringLiteral( "MyPassword" ) )) + if (!isMyPasswordImmutable()) mMyPassword = v; } @@ -110,6 +134,14 @@ return mMyPassword; } + /** + Is MyPassword Immutable + */ + bool isMyPasswordImmutable() const + { + return isImmutable( QStringLiteral( "MyPassword" ) ); + } + /** Get Item object corresponding to MyPassword() */ diff --git a/autotests/kconfig_compiler/test4.h.ref b/autotests/kconfig_compiler/test4.h.ref --- a/autotests/kconfig_compiler/test4.h.ref +++ b/autotests/kconfig_compiler/test4.h.ref @@ -31,7 +31,7 @@ static void setColor( int i, const QColor & v ) { - if (!self()->isImmutable( QStringLiteral( "Color%1" ).arg( i ) )) + if (!self()->isColorImmutable( i )) self()->mColor[i] = v; } @@ -44,13 +44,22 @@ return self()->mColor[i]; } + /** + Is Block colors. Immutable + */ + static + bool isColorImmutable( int i ) + { + return self()->isImmutable( QStringLiteral( "Color%1" ).arg( i ) ); + } + /** Set Mouse actions. */ static void setMouseAction( int i, int v ) { - if (!self()->isImmutable( QStringLiteral( "MouseAction%1" ).arg( QLatin1String( EnumButton::enumToString[i] ) ) )) + if (!self()->isMouseActionImmutable( i )) self()->mMouseAction[i] = v; } @@ -63,13 +72,22 @@ return self()->mMouseAction[i]; } + /** + Is Mouse actions. Immutable + */ + static + bool isMouseActionImmutable( int i ) + { + return self()->isImmutable( QStringLiteral( "MouseAction%1" ).arg( QLatin1String( EnumButton::enumToString[i] ) ) ); + } + /** Set Gray colors. */ static void setGrayColor( int i, const QColor & v ) { - if (!self()->isImmutable( QStringLiteral( "GrayColor%1" ).arg( i ) )) + if (!self()->isGrayColorImmutable( i )) self()->mGrayColor[i] = v; } @@ -82,13 +100,22 @@ return self()->mGrayColor[i]; } + /** + Is Gray colors. Immutable + */ + static + bool isGrayColorImmutable( int i ) + { + return self()->isImmutable( QStringLiteral( "GrayColor%1" ).arg( i ) ); + } + /** Set Gray colors as string. */ static void setColorString( int i, const QString & v ) { - if (!self()->isImmutable( QStringLiteral( "ColorString%1" ).arg( i ) )) + if (!self()->isColorStringImmutable( i )) self()->mColorString[i] = v; } @@ -101,13 +128,22 @@ return self()->mColorString[i]; } + /** + Is Gray colors as string. Immutable + */ + static + bool isColorStringImmutable( int i ) + { + return self()->isImmutable( QStringLiteral( "ColorString%1" ).arg( i ) ); + } + /** Set foo bar */ static void setFooBar( const QString & v ) { - if (!self()->isImmutable( QStringLiteral( "FooBar" ) )) + if (!self()->isFooBarImmutable()) self()->mFooBar = v; } @@ -120,6 +156,15 @@ return self()->mFooBar; } + /** + Is foo bar Immutable + */ + static + bool isFooBarImmutable() + { + return self()->isImmutable( QStringLiteral( "FooBar" ) ); + } + /** Set Age */ @@ -138,7 +183,7 @@ v = 88; } - if (!self()->isImmutable( QStringLiteral( "Age" ) )) + if (!self()->isAgeImmutable()) self()->mAge = v; } @@ -151,6 +196,15 @@ return self()->mAge; } + /** + Is Age Immutable + */ + static + bool isAgeImmutable() + { + return self()->isImmutable( QStringLiteral( "Age" ) ); + } + protected: Test4(); friend class Test4Helper; diff --git a/autotests/kconfig_compiler/test5.h.ref b/autotests/kconfig_compiler/test5.h.ref --- a/autotests/kconfig_compiler/test5.h.ref +++ b/autotests/kconfig_compiler/test5.h.ref @@ -23,7 +23,7 @@ static void setColor( int i, const QColor & v ) { - if (!self()->isImmutable( QStringLiteral( "Color%1" ).arg( i ) )) + if (!self()->isColorImmutable( i )) self()->mColor[i] = v; } @@ -36,13 +36,22 @@ return self()->mColor[i]; } + /** + Is Block colors. Immutable + */ + static + bool isColorImmutable( int i ) + { + return self()->isImmutable( QStringLiteral( "Color%1" ).arg( i ) ); + } + /** Set Mouse actions. */ static void setMouseAction( int i, int v ) { - if (!self()->isImmutable( QStringLiteral( "MouseAction%1" ).arg( QLatin1String( EnumButtonToString[i] ) ) )) + if (!self()->isMouseActionImmutable( i )) self()->mMouseAction[i] = v; } @@ -55,13 +64,22 @@ return self()->mMouseAction[i]; } + /** + Is Mouse actions. Immutable + */ + static + bool isMouseActionImmutable( int i ) + { + return self()->isImmutable( QStringLiteral( "MouseAction%1" ).arg( QLatin1String( EnumButtonToString[i] ) ) ); + } + /** Set foo bar */ static void setFooBar( const QString & v ) { - if (!self()->isImmutable( QStringLiteral( "FooBar" ) )) + if (!self()->isFooBarImmutable()) self()->mFooBar = v; } @@ -74,6 +92,15 @@ return self()->mFooBar; } + /** + Is foo bar Immutable + */ + static + bool isFooBarImmutable() + { + return self()->isImmutable( QStringLiteral( "FooBar" ) ); + } + /** Set Age */ @@ -92,7 +119,7 @@ v = 88; } - if (!self()->isImmutable( QStringLiteral( "Age" ) )) + if (!self()->isAgeImmutable()) self()->mAge = v; } @@ -105,6 +132,15 @@ return self()->mAge; } + /** + Is Age Immutable + */ + static + bool isAgeImmutable() + { + return self()->isImmutable( QStringLiteral( "Age" ) ); + } + protected: Test5(QObject *parent = nullptr); friend class Test5Helper; diff --git a/autotests/kconfig_compiler/test6.h.ref b/autotests/kconfig_compiler/test6.h.ref --- a/autotests/kconfig_compiler/test6.h.ref +++ b/autotests/kconfig_compiler/test6.h.ref @@ -19,7 +19,7 @@ */ void setColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "Color" ) )) + if (!isColorImmutable()) mColor = v; } @@ -31,12 +31,20 @@ return mColor; } + /** + Is Block colors. Immutable + */ + bool isColorImmutable() const + { + return isImmutable( QStringLiteral( "Color" ) ); + } + /** Set foo bar */ void setFooBar( const QString & v ) { - if (!isImmutable( QStringLiteral( "FooBar" ) )) + if (!isFooBarImmutable()) mFooBar = v; } @@ -48,6 +56,14 @@ return mFooBar; } + /** + Is foo bar Immutable + */ + bool isFooBarImmutable() const + { + return isImmutable( QStringLiteral( "FooBar" ) ); + } + /** Set Age */ @@ -65,7 +81,7 @@ v = 88; } - if (!isImmutable( QStringLiteral( "Age" ) )) + if (!isAgeImmutable()) mAge = v; } @@ -77,6 +93,14 @@ return mAge; } + /** + Is Age Immutable + */ + bool isAgeImmutable() const + { + return isImmutable( QStringLiteral( "Age" ) ); + } + protected: QString mParamNumber; diff --git a/autotests/kconfig_compiler/test7.h.ref b/autotests/kconfig_compiler/test7.h.ref --- a/autotests/kconfig_compiler/test7.h.ref +++ b/autotests/kconfig_compiler/test7.h.ref @@ -19,7 +19,7 @@ */ void setColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "Color" ) )) + if (!isColorImmutable()) mColor = v; } @@ -31,12 +31,20 @@ return mColor; } + /** + Is Block colors. Immutable + */ + bool isColorImmutable() const + { + return isImmutable( QStringLiteral( "Color" ) ); + } + /** Set foo bar */ void setFooBar( const QString & v ) { - if (!isImmutable( QStringLiteral( "FooBar" ) )) + if (!isFooBarImmutable()) mFooBar = v; } @@ -48,6 +56,14 @@ return mFooBar; } + /** + Is foo bar Immutable + */ + bool isFooBarImmutable() const + { + return isImmutable( QStringLiteral( "FooBar" ) ); + } + /** Set Age */ @@ -65,7 +81,7 @@ v = 88; } - if (!isImmutable( QStringLiteral( "Age" ) )) + if (!isAgeImmutable()) mAge = v; } @@ -77,6 +93,14 @@ return mAge; } + /** + Is Age Immutable + */ + bool isAgeImmutable() const + { + return isImmutable( QStringLiteral( "Age" ) ); + } + protected: int mParamNumber; diff --git a/autotests/kconfig_compiler/test8a.h.ref b/autotests/kconfig_compiler/test8a.h.ref --- a/autotests/kconfig_compiler/test8a.h.ref +++ b/autotests/kconfig_compiler/test8a.h.ref @@ -20,7 +20,7 @@ */ void setFont( const QFont & v ) { - if (!isImmutable( QStringLiteral( "Font" ) )) + if (!isFontImmutable()) mFont = v; } @@ -32,12 +32,20 @@ return mFont; } + /** + Is Font Immutable + */ + bool isFontImmutable() const + { + return isImmutable( QStringLiteral( "Font" ) ); + } + /** Set TitleFont */ void setTitleFont( const QFont & v ) { - if (!isImmutable( QStringLiteral( "TitleFont" ) )) + if (!isTitleFontImmutable()) mTitleFont = v; } @@ -49,6 +57,14 @@ return mTitleFont; } + /** + Is TitleFont Immutable + */ + bool isTitleFontImmutable() const + { + return isImmutable( QStringLiteral( "TitleFont" ) ); + } + protected: // Group diff --git a/autotests/kconfig_compiler/test8b.h.ref b/autotests/kconfig_compiler/test8b.h.ref --- a/autotests/kconfig_compiler/test8b.h.ref +++ b/autotests/kconfig_compiler/test8b.h.ref @@ -22,7 +22,7 @@ static void setSomething( uint v ) { - if (!self()->isImmutable( QStringLiteral( "Something" ) )) + if (!self()->isSomethingImmutable()) self()->mSomething = v; } @@ -35,13 +35,22 @@ return self()->mSomething; } + /** + Is Something Immutable + */ + static + bool isSomethingImmutable() + { + return self()->isImmutable( QStringLiteral( "Something" ) ); + } + /** Set FooBoo */ static void setFooBoo( bool v ) { - if (!self()->isImmutable( QStringLiteral( "FooBoo" ) )) + if (!self()->isFooBooImmutable()) self()->mFooBoo = v; } @@ -54,13 +63,22 @@ return self()->mFooBoo; } + /** + Is FooBoo Immutable + */ + static + bool isFooBooImmutable() + { + return self()->isImmutable( QStringLiteral( "FooBoo" ) ); + } + /** Set Port */ static void setPort( uint v ) { - if (!self()->isImmutable( QStringLiteral( "Port" ) )) + if (!self()->isPortImmutable()) self()->mPort = v; } @@ -73,6 +91,15 @@ return self()->mPort; } + /** + Is Port Immutable + */ + static + bool isPortImmutable() + { + return self()->isImmutable( QStringLiteral( "Port" ) ); + } + protected: Test8b(); friend class Test8bHelper; diff --git a/autotests/kconfig_compiler/test8c.h.ref b/autotests/kconfig_compiler/test8c.h.ref --- a/autotests/kconfig_compiler/test8c.h.ref +++ b/autotests/kconfig_compiler/test8c.h.ref @@ -22,7 +22,7 @@ static void setFont( const QFont & v ) { - if (!self()->isImmutable( QStringLiteral( "Font" ) )) + if (!self()->isFontImmutable()) self()->mFont = v; } @@ -35,13 +35,22 @@ return self()->mFont; } + /** + Is Font Immutable + */ + static + bool isFontImmutable() + { + return self()->isImmutable( QStringLiteral( "Font" ) ); + } + /** Set TitleFont */ static void setTitleFont( const QFont & v ) { - if (!self()->isImmutable( QStringLiteral( "TitleFont" ) )) + if (!self()->isTitleFontImmutable()) self()->mTitleFont = v; } @@ -54,6 +63,15 @@ return self()->mTitleFont; } + /** + Is TitleFont Immutable + */ + static + bool isTitleFontImmutable() + { + return self()->isImmutable( QStringLiteral( "TitleFont" ) ); + } + protected: Test8c(KSharedConfig::Ptr config, QObject *parent = nullptr); friend class Test8cHelper; diff --git a/autotests/kconfig_compiler/test9.h.ref b/autotests/kconfig_compiler/test9.h.ref --- a/autotests/kconfig_compiler/test9.h.ref +++ b/autotests/kconfig_compiler/test9.h.ref @@ -21,7 +21,7 @@ */ void setMyStringList( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "MyStringList" ) )) + if (!isMyStringListImmutable()) mMyStringList = v; } @@ -33,12 +33,20 @@ return mMyStringList; } + /** + Is MyStringList Immutable + */ + bool isMyStringListImmutable() const + { + return isImmutable( QStringLiteral( "MyStringList" ) ); + } + /** Set This is a list of paths */ void setMyPathList( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "MyPathList" ) )) + if (!isMyPathListImmutable()) mMyPathList = v; } @@ -50,12 +58,20 @@ return mMyPathList; } + /** + Is This is a list of paths Immutable + */ + bool isMyPathListImmutable() const + { + return isImmutable( QStringLiteral( "MyPathList" ) ); + } + /** Set This is an additional test for PathList */ void setMyPathsList2( const QStringList & v ) { - if (!isImmutable( QStringLiteral( "MyPathsList2" ) )) + if (!isMyPathsList2Immutable()) mMyPathsList2 = v; } @@ -67,6 +83,14 @@ return mMyPathsList2; } + /** + Is This is an additional test for PathList Immutable + */ + bool isMyPathsList2Immutable() const + { + return isImmutable( QStringLiteral( "MyPathsList2" ) ); + } + protected: public: QString mParamtransport; diff --git a/autotests/kconfig_compiler/test_dpointer.h.ref b/autotests/kconfig_compiler/test_dpointer.h.ref --- a/autotests/kconfig_compiler/test_dpointer.h.ref +++ b/autotests/kconfig_compiler/test_dpointer.h.ref @@ -33,6 +33,12 @@ static bool autoSave(); + /** + Is Enable automatic saving of calendar Immutable + */ + static + bool isAutoSaveImmutable(); + /** Get Item object corresponding to AutoSave() */ @@ -50,6 +56,12 @@ static int autoSaveInterval(); + /** + Is Auto Save Interval Immutable + */ + static + bool isAutoSaveIntervalImmutable(); + /** Get Item object corresponding to AutoSaveInterval() */ @@ -67,6 +79,12 @@ static bool confirm(); + /** + Is Confirm deletes Immutable + */ + static + bool isConfirmImmutable(); + /** Get Item object corresponding to Confirm() */ @@ -84,6 +102,12 @@ static QString archiveFile(); + /** + Is Archive File Immutable + */ + static + bool isArchiveFileImmutable(); + /** Get Item object corresponding to ArchiveFile() */ @@ -101,6 +125,12 @@ static int destination(); + /** + Is New Events/Todos Should Immutable + */ + static + bool isDestinationImmutable(); + /** Get Item object corresponding to Destination() */ @@ -118,6 +148,12 @@ static int hourSize(); + /** + Is Hour Size Immutable + */ + static + bool isHourSizeImmutable(); + /** Get Item object corresponding to HourSize() */ @@ -135,6 +171,12 @@ static bool selectionStartsEditor(); + /** + Is Time range selection in agenda view starts event editor Immutable + */ + static + bool isSelectionStartsEditorImmutable(); + /** Get Item object corresponding to SelectionStartsEditor() */ @@ -152,6 +194,12 @@ static QStringList selectedPlugins(); + /** + Is SelectedPlugins Immutable + */ + static + bool isSelectedPluginsImmutable(); + /** Get Item object corresponding to SelectedPlugins() */ @@ -169,6 +217,12 @@ static QColor highlightColor(); + /** + Is Highlight color Immutable + */ + static + bool isHighlightColorImmutable(); + /** Get Item object corresponding to HighlightColor() */ @@ -186,6 +240,12 @@ static QColor agendaBgColor(); + /** + Is Agenda view background color Immutable + */ + static + bool isAgendaBgColorImmutable(); + /** Get Item object corresponding to AgendaBgColor() */ @@ -203,6 +263,12 @@ static QFont timeBarFont(); + /** + Is Time bar Immutable + */ + static + bool isTimeBarFontImmutable(); + /** Get Item object corresponding to TimeBarFont() */ diff --git a/autotests/kconfig_compiler/test_dpointer.cpp.ref b/autotests/kconfig_compiler/test_dpointer.cpp.ref --- a/autotests/kconfig_compiler/test_dpointer.cpp.ref +++ b/autotests/kconfig_compiler/test_dpointer.cpp.ref @@ -157,185 +157,240 @@ void TestDPointer::setAutoSave( bool v ) { - if (!self()->isImmutable( QStringLiteral( "AutoSave" ) )) + if (!self()->TestDPointer::isAutoSaveImmutable()) self()->d->autoSave = v; } bool TestDPointer::autoSave() { return self()->d->autoSave; } +bool TestDPointer::isAutoSaveImmutable() +{ + return self()->isImmutable( QStringLiteral( "AutoSave" ) ); +} + KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem() { return d->autoSaveItem; } void TestDPointer::setAutoSaveInterval( int v ) { - if (!self()->isImmutable( QStringLiteral( "AutoSaveInterval" ) )) + if (!self()->TestDPointer::isAutoSaveIntervalImmutable()) self()->d->autoSaveInterval = v; } int TestDPointer::autoSaveInterval() { return self()->d->autoSaveInterval; } +bool TestDPointer::isAutoSaveIntervalImmutable() +{ + return self()->isImmutable( QStringLiteral( "AutoSaveInterval" ) ); +} + KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem() { return d->autoSaveIntervalItem; } void TestDPointer::setConfirm( bool v ) { - if (!self()->isImmutable( QStringLiteral( "Confirm" ) )) + if (!self()->TestDPointer::isConfirmImmutable()) self()->d->confirm = v; } bool TestDPointer::confirm() { return self()->d->confirm; } +bool TestDPointer::isConfirmImmutable() +{ + return self()->isImmutable( QStringLiteral( "Confirm" ) ); +} + KConfigSkeleton::ItemBool *TestDPointer::confirmItem() { return d->confirmItem; } void TestDPointer::setArchiveFile( const QString & v ) { - if (!self()->isImmutable( QStringLiteral( "ArchiveFile" ) )) + if (!self()->TestDPointer::isArchiveFileImmutable()) self()->d->archiveFile = v; } QString TestDPointer::archiveFile() { return self()->d->archiveFile; } +bool TestDPointer::isArchiveFileImmutable() +{ + return self()->isImmutable( QStringLiteral( "ArchiveFile" ) ); +} + KConfigSkeleton::ItemString *TestDPointer::archiveFileItem() { return d->archiveFileItem; } void TestDPointer::setDestination( int v ) { - if (!self()->isImmutable( QStringLiteral( "Destination" ) )) + if (!self()->TestDPointer::isDestinationImmutable()) self()->d->destination = v; } int TestDPointer::destination() { return self()->d->destination; } +bool TestDPointer::isDestinationImmutable() +{ + return self()->isImmutable( QStringLiteral( "Destination" ) ); +} + KConfigSkeleton::ItemEnum *TestDPointer::destinationItem() { return d->destinationItem; } void TestDPointer::setHourSize( int v ) { - if (!self()->isImmutable( QStringLiteral( "HourSize" ) )) + if (!self()->TestDPointer::isHourSizeImmutable()) self()->d->hourSize = v; } int TestDPointer::hourSize() { return self()->d->hourSize; } +bool TestDPointer::isHourSizeImmutable() +{ + return self()->isImmutable( QStringLiteral( "HourSize" ) ); +} + KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem() { return d->hourSizeItem; } void TestDPointer::setSelectionStartsEditor( bool v ) { - if (!self()->isImmutable( QStringLiteral( "SelectionStartsEditor" ) )) + if (!self()->TestDPointer::isSelectionStartsEditorImmutable()) self()->d->selectionStartsEditor = v; } bool TestDPointer::selectionStartsEditor() { return self()->d->selectionStartsEditor; } +bool TestDPointer::isSelectionStartsEditorImmutable() +{ + return self()->isImmutable( QStringLiteral( "SelectionStartsEditor" ) ); +} + KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem() { return d->selectionStartsEditorItem; } void TestDPointer::setSelectedPlugins( const QStringList & v ) { - if (!self()->isImmutable( QStringLiteral( "SelectedPlugins" ) )) + if (!self()->TestDPointer::isSelectedPluginsImmutable()) self()->d->selectedPlugins = v; } QStringList TestDPointer::selectedPlugins() { return self()->d->selectedPlugins; } +bool TestDPointer::isSelectedPluginsImmutable() +{ + return self()->isImmutable( QStringLiteral( "SelectedPlugins" ) ); +} + KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem() { return d->selectedPluginsItem; } void TestDPointer::setHighlightColor( const QColor & v ) { - if (!self()->isImmutable( QStringLiteral( "HighlightColor" ) )) + if (!self()->TestDPointer::isHighlightColorImmutable()) self()->d->highlightColor = v; } QColor TestDPointer::highlightColor() { return self()->d->highlightColor; } +bool TestDPointer::isHighlightColorImmutable() +{ + return self()->isImmutable( QStringLiteral( "HighlightColor" ) ); +} + KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem() { return d->highlightColorItem; } void TestDPointer::setAgendaBgColor( const QColor & v ) { - if (!self()->isImmutable( QStringLiteral( "AgendaBgColor" ) )) + if (!self()->TestDPointer::isAgendaBgColorImmutable()) self()->d->agendaBgColor = v; } QColor TestDPointer::agendaBgColor() { return self()->d->agendaBgColor; } +bool TestDPointer::isAgendaBgColorImmutable() +{ + return self()->isImmutable( QStringLiteral( "AgendaBgColor" ) ); +} + KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem() { return d->agendaBgColorItem; } void TestDPointer::setTimeBarFont( const QFont & v ) { - if (!self()->isImmutable( QStringLiteral( "TimeBarFont" ) )) + if (!self()->TestDPointer::isTimeBarFontImmutable()) self()->d->timeBarFont = v; } QFont TestDPointer::timeBarFont() { return self()->d->timeBarFont; } +bool TestDPointer::isTimeBarFontImmutable() +{ + return self()->isImmutable( QStringLiteral( "TimeBarFont" ) ); +} + KConfigSkeleton::ItemFont *TestDPointer::timeBarFontItem() { diff --git a/autotests/kconfig_compiler/test_notifiers.h.ref b/autotests/kconfig_compiler/test_notifiers.h.ref --- a/autotests/kconfig_compiler/test_notifiers.h.ref +++ b/autotests/kconfig_compiler/test_notifiers.h.ref @@ -19,7 +19,7 @@ */ void setColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "Color" ) )) + if (!isColorImmutable()) mColor = v; } @@ -31,12 +31,20 @@ return mColor; } + /** + Is Block colors. Immutable + */ + bool isColorImmutable() const + { + return isImmutable( QStringLiteral( "Color" ) ); + } + /** Set foo bar */ void setFooBar( const QString & v ) { - if (!isImmutable( QStringLiteral( "FooBar" ) )) + if (!isFooBarImmutable()) mFooBar = v; } @@ -48,6 +56,14 @@ return mFooBar; } + /** + Is foo bar Immutable + */ + bool isFooBarImmutable() const + { + return isImmutable( QStringLiteral( "FooBar" ) ); + } + /** Set Age */ @@ -65,7 +81,7 @@ v = 88; } - if (!isImmutable( QStringLiteral( "Age" ) )) + if (!isAgeImmutable()) mAge = v; } @@ -77,6 +93,14 @@ return mAge; } + /** + Is Age Immutable + */ + bool isAgeImmutable() const + { + return isImmutable( QStringLiteral( "Age" ) ); + } + protected: int mParamNumber; diff --git a/autotests/kconfig_compiler/test_qdebugcategory.h.ref b/autotests/kconfig_compiler/test_qdebugcategory.h.ref --- a/autotests/kconfig_compiler/test_qdebugcategory.h.ref +++ b/autotests/kconfig_compiler/test_qdebugcategory.h.ref @@ -21,7 +21,7 @@ */ void setColor( const QColor & v ) { - if (!isImmutable( QStringLiteral( "Color" ) )) + if (!isColorImmutable()) mColor = v; } @@ -33,12 +33,20 @@ return mColor; } + /** + Is Block colors. Immutable + */ + bool isColorImmutable() const + { + return isImmutable( QStringLiteral( "Color" ) ); + } + /** Set foo bar */ void setFooBar( const QString & v ) { - if (!isImmutable( QStringLiteral( "FooBar" ) )) + if (!isFooBarImmutable()) mFooBar = v; } @@ -50,6 +58,14 @@ return mFooBar; } + /** + Is foo bar Immutable + */ + bool isFooBarImmutable() const + { + return isImmutable( QStringLiteral( "FooBar" ) ); + } + /** Set Age */ @@ -67,7 +83,7 @@ v = 88; } - if (!isImmutable( QStringLiteral( "Age" ) )) + if (!isAgeImmutable()) mAge = v; } @@ -79,6 +95,14 @@ return mAge; } + /** + Is Age Immutable + */ + bool isAgeImmutable() const + { + return isImmutable( QStringLiteral( "Age" ) ); + } + protected: int mParamNumber; diff --git a/autotests/kconfig_compiler/test_signal.h.ref b/autotests/kconfig_compiler/test_signal.h.ref --- a/autotests/kconfig_compiler/test_signal.h.ref +++ b/autotests/kconfig_compiler/test_signal.h.ref @@ -21,7 +21,7 @@ static void setEmoticonTheme( const QString & v ) { - if (v != self()->mEmoticonTheme && !self()->isImmutable( QStringLiteral( "emoticonTheme" ) )) { + if (v != self()->mEmoticonTheme && !self()->isEmoticonThemeImmutable()) { self()->mEmoticonTheme = v; self()->mSettingsChanged |= signalEmoticonSettingsChanged; } @@ -36,13 +36,22 @@ return self()->mEmoticonTheme; } + /** + Is Current emoticon theme. Immutable + */ + static + bool isEmoticonThemeImmutable() + { + return self()->isImmutable( QStringLiteral( "emoticonTheme" ) ); + } + /** Set Enable emoticon support in Kopete. */ static void setUseEmoticon( bool v ) { - if (v != self()->mUseEmoticon && !self()->isImmutable( QStringLiteral( "useEmoticon" ) )) { + if (v != self()->mUseEmoticon && !self()->isUseEmoticonImmutable()) { self()->mUseEmoticon = v; self()->mSettingsChanged |= signalEmoticonSettingsChanged; } @@ -57,13 +66,22 @@ return self()->mUseEmoticon; } + /** + Is Enable emoticon support in Kopete. Immutable + */ + static + bool isUseEmoticonImmutable() + { + return self()->isImmutable( QStringLiteral( "useEmoticon" ) ); + } + /** Set Use strict mode in emoticon parsing. */ static void setEmoticonRequireSpace( bool v ) { - if (v != self()->mEmoticonRequireSpace && !self()->isImmutable( QStringLiteral( "emoticonRequireSpace" ) )) { + if (v != self()->mEmoticonRequireSpace && !self()->isEmoticonRequireSpaceImmutable()) { self()->mEmoticonRequireSpace = v; self()->mSettingsChanged |= signalEmoticonSettingsChanged; } @@ -78,13 +96,22 @@ return self()->mEmoticonRequireSpace; } + /** + Is Use strict mode in emoticon parsing. Immutable + */ + static + bool isEmoticonRequireSpaceImmutable() + { + return self()->isImmutable( QStringLiteral( "emoticonRequireSpace" ) ); + } + /** Set Absolute path to a directory containing a Adium/Kopete chat window style. */ static void setStylePath( const QString & v ) { - if (v != self()->mStylePath && !self()->isImmutable( QStringLiteral( "stylePath" ) )) { + if (v != self()->mStylePath && !self()->isStylePathImmutable()) { self()->mStylePath = v; self()->mSettingsChanged |= signalStyleChanged; } @@ -99,13 +126,22 @@ return self()->mStylePath; } + /** + Is Absolute path to a directory containing a Adium/Kopete chat window style. Immutable + */ + static + bool isStylePathImmutable() + { + return self()->isImmutable( QStringLiteral( "stylePath" ) ); + } + /** Set Relative path to a CSS variant for the current style. */ static void setStyleCSSVariant( const QString & v ) { - if (!self()->isImmutable( QStringLiteral( "StyleCSSVariant" ) )) + if (!self()->isStyleCSSVariantImmutable()) self()->mStyleCSSVariant = v; } @@ -118,6 +154,15 @@ return self()->mStyleCSSVariant; } + /** + Is Relative path to a CSS variant for the current style. Immutable + */ + static + bool isStyleCSSVariantImmutable() + { + return self()->isImmutable( QStringLiteral( "StyleCSSVariant" ) ); + } + enum { signalEmoticonSettingsChanged = 0x1, diff --git a/autotests/kconfig_compiler/test_translation_kde.h.ref b/autotests/kconfig_compiler/test_translation_kde.h.ref --- a/autotests/kconfig_compiler/test_translation_kde.h.ref +++ b/autotests/kconfig_compiler/test_translation_kde.h.ref @@ -25,6 +25,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + protected: // General diff --git a/autotests/kconfig_compiler/test_translation_kde_domain.h.ref b/autotests/kconfig_compiler/test_translation_kde_domain.h.ref --- a/autotests/kconfig_compiler/test_translation_kde_domain.h.ref +++ b/autotests/kconfig_compiler/test_translation_kde_domain.h.ref @@ -25,6 +25,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + protected: // General diff --git a/autotests/kconfig_compiler/test_translation_qt.h.ref b/autotests/kconfig_compiler/test_translation_qt.h.ref --- a/autotests/kconfig_compiler/test_translation_qt.h.ref +++ b/autotests/kconfig_compiler/test_translation_qt.h.ref @@ -25,6 +25,14 @@ return mAutoSave; } + /** + Is Enable automatic saving of calendar Immutable + */ + bool isAutoSaveImmutable() const + { + return isImmutable( QStringLiteral( "AutoSave" ) ); + } + protected: // General diff --git a/src/kconfig_compiler/KConfigCodeGeneratorBase.h b/src/kconfig_compiler/KConfigCodeGeneratorBase.h --- a/src/kconfig_compiler/KConfigCodeGeneratorBase.h +++ b/src/kconfig_compiler/KConfigCodeGeneratorBase.h @@ -82,6 +82,9 @@ // TODO: write to the stream directly without returning a QString. QString memberAccessorBody(const CfgEntry *e, bool globalEnums) const; + // Implements the isImmutable for the CfgEntry + void memberImmutableBody(const CfgEntry *e, bool globalEnums); + // Implements the `Set` methods for the CfgEntry void memberMutatorBody(const CfgEntry *e); diff --git a/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp b/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp --- a/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp +++ b/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp @@ -184,39 +184,51 @@ return result; } -void KConfigCodeGeneratorBase::createIfSetLogic(const CfgEntry *e, const QString &varExpression) +void KConfigCodeGeneratorBase::memberImmutableBody(const CfgEntry *e, bool globalEnums) { - const QString n = e->name; - const QString t = e->type; - const bool hasBody = !e->signalList.empty() || m_cfg.generateProperties; + QString n = e->name; + QString t = e->type; - m_stream << whitespace() << "if ("; - if (hasBody) { - m_stream << "v != " << varExpression << " && "; - } - m_stream << "!" << m_this << "isImmutable( QStringLiteral( \""; + stream() << whitespace() << "return " << m_this << "isImmutable( QStringLiteral( \""; if (!e->param.isEmpty()) { - QString paramName = e->paramName; - - m_stream << paramName.replace(QStringLiteral("$(") + e->param + QStringLiteral(")"), QLatin1String("%1")) << "\" ).arg( "; + stream() << QString(e->paramName).replace(QLatin1String("$(") + e->param + QLatin1Char(')'), QLatin1String("%1")) << "\" ).arg( "; if (e->paramType == QLatin1String("Enum")) { - m_stream << "QLatin1String( "; + stream() << "QLatin1String( "; - if (m_cfg.globalEnums) { - m_stream << enumName(e->param) << "ToString[i]"; + if (globalEnums) { + stream() << enumName(e->param) << "ToString[i]"; } else { - m_stream << enumName(e->param) << "::enumToString[i]"; + stream() << enumName(e->param) << "::enumToString[i]"; } - m_stream << " )"; + stream() << " )"; } else { - m_stream << "i"; + stream() << "i"; } - m_stream << " )"; + stream() << " )"; } else { - m_stream << n << "\" )"; + stream() << n << "\" )"; + } + stream() << " );" << endl; +} + +void KConfigCodeGeneratorBase::createIfSetLogic(const CfgEntry *e, const QString &varExpression) +{ + const QString n = e->name; + const QString t = e->type; + const bool hasBody = !e->signalList.empty() || m_cfg.generateProperties; + + m_stream << whitespace() << "if ("; + if (hasBody) { + m_stream << "v != " << varExpression << " && "; + } + + const auto immutablefunction = immutableFunction(n, m_cfg.dpointer ? m_cfg.className : QString()); + m_stream << "!" << m_this << immutablefunction << "("; + if (!e->param.isEmpty()) { + m_stream << " i "; } - m_stream << " ))"; + m_stream << "))"; } void KConfigCodeGeneratorBase::memberMutatorBody(const CfgEntry *e) diff --git a/src/kconfig_compiler/KConfigCommonStructs.h b/src/kconfig_compiler/KConfigCommonStructs.h --- a/src/kconfig_compiler/KConfigCommonStructs.h +++ b/src/kconfig_compiler/KConfigCommonStructs.h @@ -136,6 +136,7 @@ QString getDefaultFunction(const QString &n, const QString &className = QString()); QString setFunction(const QString &n, const QString &className = QString()); QString getFunction(const QString &n, const QString &className = QString()); +QString immutableFunction(const QString &n, const QString &className = QString()); QString itemAccessorBody(const CfgEntry *e, const KConfigParameters &cfg); QString signalEnumName(const QString &signalName); diff --git a/src/kconfig_compiler/KConfigHeaderGenerator.h b/src/kconfig_compiler/KConfigHeaderGenerator.h --- a/src/kconfig_compiler/KConfigHeaderGenerator.h +++ b/src/kconfig_compiler/KConfigHeaderGenerator.h @@ -71,7 +71,9 @@ void createSetters(const CfgEntry *entry); void createItemAcessors(const CfgEntry *entry, const QString &returnType); void createGetters(const CfgEntry *entry, const QString &returnType); + void createImmutableGetters(const CfgEntry *entry); void createProperties(const CfgEntry *entry, const QString &returnType); + void createImmutableProperty(const CfgEntry *entry); void createDefaultValueMember(const CfgEntry *entry); }; diff --git a/src/kconfig_compiler/KConfigHeaderGenerator.cpp b/src/kconfig_compiler/KConfigHeaderGenerator.cpp --- a/src/kconfig_compiler/KConfigHeaderGenerator.cpp +++ b/src/kconfig_compiler/KConfigHeaderGenerator.cpp @@ -79,7 +79,9 @@ createSetters(entry); createProperties(entry, returnType); + createImmutableProperty(entry); createGetters(entry, returnType); + createImmutableGetters(entry); createDefaultValueMember(entry); createItemAcessors(entry, returnType); } @@ -172,7 +174,7 @@ } QStringList values; - for (const auto choice : qAsConst(chlist)) { + for (const auto &choice : qAsConst(chlist)) { values.append(choices.prefix + choice.name); } @@ -415,6 +417,16 @@ stream() << ")\n"; } +void KConfigHeaderGenerator::createImmutableProperty(const CfgEntry *entry) +{ + if (!cfg().generateProperties) { + return; + } + stream() << whitespace(); + stream() << "Q_PROPERTY(bool " << immutableFunction(entry->name); + stream() << " CONSTANT)\n"; +} + void KConfigHeaderGenerator::createSetters(const CfgEntry *entry) { // Manipulator @@ -484,8 +496,38 @@ } } +void KConfigHeaderGenerator::createImmutableGetters(const CfgEntry *entry) +{ + stream() << whitespace() << "/**\n"; + stream() << whitespace() << " Is " << entry->label << " Immutable\n"; + stream() << whitespace() << "*/\n"; + // Immutable + if (cfg().staticAccessors) { + stream() << whitespace() << "static\n"; + } + stream() << whitespace() << ""; + stream() << "bool " << immutableFunction(entry->name) << "("; + if (!entry->param.isEmpty()) { + stream() << " " << cppType(entry->paramType)<< " i "; + } + stream() << ")" << Const(); + // function body inline only if not using dpointer + // for BC mode + if (!cfg().dpointer) { + stream() << '\n'; + startScope(); + memberImmutableBody(entry, cfg().globalEnums); + endScope(); + stream() << '\n'; + } else { + stream() << ";\n\n"; + } +} + void KConfigHeaderGenerator::createItemAcessors(const CfgEntry *entry, const QString &returnType) { + Q_UNUSED(returnType) + // Item accessor if (!cfg().itemAccessors) { return; diff --git a/src/kconfig_compiler/KConfigSourceGenerator.h b/src/kconfig_compiler/KConfigSourceGenerator.h --- a/src/kconfig_compiler/KConfigSourceGenerator.h +++ b/src/kconfig_compiler/KConfigSourceGenerator.h @@ -76,6 +76,7 @@ void doGetterSetterDPointerMode(); void createGetterDPointerMode(const CfgEntry *entry); + void createImmutableGetterDPointerMode(const CfgEntry *entry); void createSetterDPointerMode(const CfgEntry *entry); void createItemGetterDPointerMode(const CfgEntry *entry); diff --git a/src/kconfig_compiler/KConfigSourceGenerator.cpp b/src/kconfig_compiler/KConfigSourceGenerator.cpp --- a/src/kconfig_compiler/KConfigSourceGenerator.cpp +++ b/src/kconfig_compiler/KConfigSourceGenerator.cpp @@ -478,6 +478,20 @@ stream() << '\n'; } +void KConfigSourceGenerator::createImmutableGetterDPointerMode(const CfgEntry *entry) +{ + stream() << whitespace() << ""; + stream() << "bool " << " " << immutableFunction(entry->name, cfg().className) << "("; + if (!entry->param.isEmpty()) { + stream() << " " << cppType(entry->paramType) << " i "; + } + stream() << ")" << Const() << '\n'; + startScope(); + memberImmutableBody(entry, cfg().globalEnums); + endScope(); + stream() << '\n'; +} + void KConfigSourceGenerator::createSetterDPointerMode(const CfgEntry *entry) { // Manipulator @@ -533,6 +547,7 @@ for (auto *entry : parseResult.entries) { createSetterDPointerMode(entry); createGetterDPointerMode(entry); + createImmutableGetterDPointerMode(entry); createItemGetterDPointerMode(entry); stream() << '\n'; } diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp --- a/src/kconfig_compiler/kconfig_compiler.cpp +++ b/src/kconfig_compiler/kconfig_compiler.cpp @@ -154,6 +154,18 @@ return result; } +QString immutableFunction(const QString &n, const QString &className) +{ + QString result = QLatin1String("is") + n; + result[2] = result[2].toUpper(); + result += "Immutable"; + + if (!className.isEmpty()) { + result = className + QLatin1String("::") + result; + } + return result; +} + void addQuotes(QString &s) { if (!s.startsWith(QLatin1Char('"'))) {