From af146c83f5f7f4c30dbf3cc0beaf5498153b6ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= Date: Thu, 18 Sep 2014 12:49:08 -0300 Subject: Move diagnostic pragmas outside/around functions. gcc 4.5 doesn't support "#pragma GCC diagnostic" inside functions. Apparently it also doesn't support "#pragma GCC diagnostic push/pop", but it doesn't fail for that, so meh. --- src/core/kcoreconfigskeleton.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp index f9c9f268..e4255a60 100644 --- a/src/core/kcoreconfigskeleton.cpp +++ b/src/core/kcoreconfigskeleton.cpp @@ -1105,33 +1105,33 @@ void KCoreConfigSkeleton::usrSetDefaults() { } -void KCoreConfigSkeleton::usrRead() -{ #ifdef Q_CC_GNU #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif +void KCoreConfigSkeleton::usrRead() +{ usrReadConfig(); +} #ifdef Q_CC_GNU #pragma GCC diagnostic pop #endif -} void KCoreConfigSkeleton::usrReadConfig() { } -bool KCoreConfigSkeleton::usrSave() -{ #ifdef Q_CC_GNU #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif +bool KCoreConfigSkeleton::usrSave() +{ return usrWriteConfig(); +} #ifdef Q_CC_GNU #pragma GCC diagnostic pop #endif -} bool KCoreConfigSkeleton::usrWriteConfig() { -- cgit v1.2.1