Changeset View
Changeset View
Standalone View
Standalone View
data/update_default_rules.cpp
Show All 34 Lines | 29 | int main( int argc, char* argv[] ) | |||
---|---|---|---|---|---|
35 | 35 | | |||
36 | QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString( "kwin/default_rules/%1" ).arg(argv[ 1 ] )); | 36 | QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString( "kwin/default_rules/%1" ).arg(argv[ 1 ] )); | ||
37 | if( file.isEmpty()) | 37 | if( file.isEmpty()) | ||
38 | { | 38 | { | ||
39 | qWarning() << "File " << argv[ 1 ] << " not found!" ; | 39 | qWarning() << "File " << argv[ 1 ] << " not found!" ; | ||
40 | return 1; | 40 | return 1; | ||
41 | } | 41 | } | ||
42 | KConfig src_cfg( file ); | 42 | KConfig src_cfg( file ); | ||
43 | KConfig dest_cfg( "kwinrulesrc" ); | 43 | KConfig dest_cfg( "kwinrulesrc", KConfig::NoGlobals); | ||
zzag: While we're on this, could you please remove a whitespace between the open parenthesis and… | |||||
44 | KConfigGroup scg(&src_cfg, "General"); | 44 | KConfigGroup scg(&src_cfg, "General"); | ||
45 | KConfigGroup dcg(&dest_cfg, "General"); | 45 | KConfigGroup dcg(&dest_cfg, "General"); | ||
46 | int count = scg.readEntry( "count", 0 ); | 46 | int count = scg.readEntry( "count", 0 ); | ||
47 | int pos = dcg.readEntry( "count", 0 ); | 47 | int pos = dcg.readEntry( "count", 0 ); | ||
48 | for( int group = 1; | 48 | for( int group = 1; | ||
49 | group <= count; | 49 | group <= count; | ||
50 | ++group ) | 50 | ++group ) | ||
51 | { | 51 | { | ||
Show All 18 Lines |
While we're on this, could you please remove a whitespace between the open parenthesis and "kwinrulesrc"?