|
From: <sv...@va...> - 2010-10-18 21:33:24
|
Author: cerion
Date: 2010-10-18 22:33:15 +0100 (Mon, 18 Oct 2010)
New Revision: 521
Log:
Don't prevent options of type WDG_NONE from being saved to project config (QSettings).
- Though it's not very useful to store these opts across runs, it is useful to cache at least the view-log option value within a run, giving consistency with the usage of the rest of option/config.
Modified:
trunk/src/options/vk_option.cpp
Modified: trunk/src/options/vk_option.cpp
===================================================================
--- trunk/src/options/vk_option.cpp 2010-10-18 20:51:25 UTC (rev 520)
+++ trunk/src/options/vk_option.cpp 2010-10-18 21:33:15 UTC (rev 521)
@@ -329,14 +329,10 @@
The following option types are NOT saved:
::argType == ARG_NONE (e.g. --help)
- They don't take args, so there's nothing to save
- ::widgType == WDG_NONE (e.g. --project-file=<myfile>)
- - These may or may not take an argument, but are only meant to drive
- Valkyrie from the commandline. There nothing to save here either.
*/
bool VkOption::isaConfigOpt()
{
- return ( argType != VkOPT::ARG_NONE && // ARG_NONE: takes no args
- widgType != VkOPT::WDG_NONE ); // WDG_NONE: has no UI widget
+ return ( argType != VkOPT::ARG_NONE ); // ARG_NONE: takes no args
}
/*!
@@ -349,9 +345,13 @@
QString key = configKey();
if ( !vkCfgProj->contains( key ) || vkCfgProj->value( key ) != argVal ) {
vkCfgProj->setValue( key, argVal );
+ vkCfgProj->sync();
emit valueChanged();
}
}
+ else {
+ VK_DEBUG( "Warning: Not a config opt: '%s'.", qPrintable( configKey() ) );
+ }
}
|