fixed compilation against qt5

This commit is contained in:
Hugo Pereira Da Costa 2013-08-01 17:21:26 +02:00
parent e80da066ff
commit b993d576c9
4 changed files with 16 additions and 18 deletions

View file

@ -39,11 +39,8 @@
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusMessage> #include <QtDBus/QDBusMessage>
#include <KAboutData>
#include <KAboutApplicationDialog>
#include <KConfigGroup> #include <KConfigGroup>
#include <KGlobal> #include <KLocalizedString>
#include <KLocale>
//_______________________________________________________________________ //_______________________________________________________________________
extern "C" extern "C"
@ -60,11 +57,11 @@ namespace Oxygen
QObject( parent ) QObject( parent )
{ {
// cataloh // catalog
KGlobal::locale()->insertCatalog("kwin_clients"); KLocalizedString::insertCatalog( QStringLiteral( "kwin_clients" ) );
// configuration // configuration
_configuration = KSharedConfig::openConfig( "oxygenrc" ); _configuration = KSharedConfig::openConfig( QStringLiteral( "oxygenrc" ) );
_configWidget = new ConfigWidget( parent ); _configWidget = new ConfigWidget( parent );
@ -146,7 +143,7 @@ namespace Oxygen
// sync configuration // sync configuration
_configuration->sync(); _configuration->sync();
QDBusMessage message( QDBusMessage::createSignal("/OxygenWindeco", "org.kde.Oxygen.Style", "reparseConfiguration") ); QDBusMessage message( QDBusMessage::createSignal( QStringLiteral( "/OxygenWindeco" ), QStringLiteral( "org.kde.Oxygen.Style" ), QStringLiteral( "reparseConfiguration") ) );
QDBusConnection::sessionBus().send(message); QDBusConnection::sessionBus().send(message);
} }

View file

@ -28,11 +28,12 @@
#include <kdeversion.h> #include <kdeversion.h>
#include <QGroupBox>
#include <QIcon>
#include <QLabel> #include <QLabel>
#include <QLayout> #include <QLayout>
#include <QGroupBox>
#include <KLocalizedString> #include <KLocalizedString>
#include <KTabWidget>
namespace Oxygen namespace Oxygen
{ {
@ -59,7 +60,7 @@ namespace Oxygen
_animationConfigWidget->installEventFilter( this ); _animationConfigWidget->installEventFilter( this );
// expert mode // expert mode
ui._expertModeButton->setIcon( KIcon("configure") ); ui._expertModeButton->setIcon( QIcon::fromTheme( QStringLiteral( "configure" ) ) );
toggleExpertModeInternal( false ); toggleExpertModeInternal( false );
// connections // connections

View file

@ -28,6 +28,7 @@
#include "oxygenexceptiondialog.h" #include "oxygenexceptiondialog.h"
#include <QPointer> #include <QPointer>
#include <QIcon>
#include <KLocalizedString> #include <KLocalizedString>
#include <KMessageBox> #include <KMessageBox>
@ -52,12 +53,11 @@ namespace Oxygen
ui.exceptionListView->sortByColumn( ExceptionModel::TYPE ); ui.exceptionListView->sortByColumn( ExceptionModel::TYPE );
ui.exceptionListView->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Ignored ) ); ui.exceptionListView->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Ignored ) );
KIconLoader* icon_loader = KIconLoader::global(); ui.moveUpButton->setIcon( QIcon::fromTheme( QStringLiteral( "arrow-up" ) ) );
ui.moveUpButton->setIcon( KIcon( "arrow-up", icon_loader ) ); ui.moveDownButton->setIcon( QIcon::fromTheme( QStringLiteral( "arrow-down" ) ) );
ui.moveDownButton->setIcon( KIcon( "arrow-down", icon_loader ) ); ui.addButton->setIcon( QIcon::fromTheme( QStringLiteral( "list-add" ) ) );
ui.addButton->setIcon( KIcon( "list-add", icon_loader ) ); ui.removeButton->setIcon( QIcon::fromTheme( QStringLiteral( "list-remove" ) ) );
ui.removeButton->setIcon( KIcon( "list-remove", icon_loader ) ); ui.editButton->setIcon( QIcon::fromTheme( QStringLiteral( "edit-rename" ) ) );
ui.editButton->setIcon( KIcon( "edit-rename", icon_loader ) );
connect( ui.addButton, SIGNAL(clicked()), SLOT(add()) ); connect( ui.addButton, SIGNAL(clicked()), SLOT(add()) );
connect( ui.editButton, SIGNAL(clicked()), SLOT(edit()) ); connect( ui.editButton, SIGNAL(clicked()), SLOT(edit()) );

View file

@ -31,7 +31,7 @@ namespace Oxygen
//_______________________________________________ //_______________________________________________
const QString ExceptionModel::_columnTitles[ ExceptionModel::nColumns ] = const QString ExceptionModel::_columnTitles[ ExceptionModel::nColumns ] =
{ {
"", QStringLiteral( "" ),
i18n("Exception Type"), i18n("Exception Type"),
i18n("Regular Expression") i18n("Regular Expression")
}; };