diff --git a/clients/oxygen/config/oxygendetectwidget.cpp b/clients/oxygen/config/oxygendetectwidget.cpp index cc5a5d8534..1162b74326 100644 --- a/clients/oxygen/config/oxygendetectwidget.cpp +++ b/clients/oxygen/config/oxygendetectwidget.cpp @@ -81,18 +81,18 @@ namespace Oxygen return; } - _info = KWindowSystem::windowInfo( window, -1U, -1U ); - if( !_info.valid()) + _info.reset(new KWindowInfo( window, -1U, -1U )); + if( !_info->valid()) { emit detectionDone( false ); return; } - const QString wmClassClass( QString::fromUtf8( _info.windowClassClass() ) ); - const QString wmClassName( QString::fromUtf8( _info.windowClassName() ) ); + const QString wmClassClass( QString::fromUtf8( _info->windowClassClass() ) ); + const QString wmClassName( QString::fromUtf8( _info->windowClassName() ) ); windowClass->setText( QStringLiteral( "%1 (%2 %3)" ).arg( wmClassClass ).arg( wmClassName ).arg( wmClassClass ) ); - Ui::OxygenDetectWidget::windowTitle->setText( _info.name() ); + Ui::OxygenDetectWidget::windowTitle->setText( _info->name() ); emit detectionDone( exec() == QDialog::Accepted ); return; diff --git a/clients/oxygen/config/oxygendetectwidget.h b/clients/oxygen/config/oxygendetectwidget.h index 320708fda1..a71848823f 100644 --- a/clients/oxygen/config/oxygendetectwidget.h +++ b/clients/oxygen/config/oxygendetectwidget.h @@ -63,7 +63,7 @@ namespace Oxygen //! window information const KWindowInfo& windowInfo() const - { return _info; } + { return *(_info.data()); } //! exception type Configuration::EnumExceptionType exceptionType() const @@ -99,7 +99,7 @@ namespace Oxygen QDialog* _grabber; //! current window information - KWindowInfo _info; + QScopedPointer _info; //! wm state atom xcb_atom_t _wmStateAtom;