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.
wilder
Nicolás Alvarez 12 years ago
parent a26008ef67
commit af146c83f5
  1. 12
      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()
{

Loading…
Cancel
Save