Git commit ced76f603801a910f5746b03017f9d1cee2c745a by Montel Laurent. Committed on 31/10/2014 at 22:04. Pushed by mlaurent into branch 'master'. Port to new connect api M +3 -5 ksmserver/screenlocker/greeter/greeterapp.cpp M +0 -1 ksmserver/screenlocker/greeter/sessions.cpp M +3 -4 ksmserver/screenlocker/interface.cpp M +1 -2 ksmserver/screenlocker/ksldapp.cpp M +14 -14 ksmserver/server.cpp M +0 -1 ksmserver/shutdowndlg.cpp http://commits.kde.org/plasma-workspace/ced76f603801a910f5746b03017f9d1cee2= c745a diff --git a/ksmserver/screenlocker/greeter/greeterapp.cpp b/ksmserver/scre= enlocker/greeter/greeterapp.cpp index fd1d20b..a32f1ef 100644 --- a/ksmserver/screenlocker/greeter/greeterapp.cpp +++ b/ksmserver/screenlocker/greeter/greeterapp.cpp @@ -75,7 +75,7 @@ UnlockApp::UnlockApp(int &argc, char **argv) { connect(m_authenticator, &Authenticator::succeeded, this, &QCoreApplic= ation::quit); initialize(); - connect(this, SIGNAL(screenAdded(QScreen*)), SLOT(desktopResized())); + connect(this, &UnlockApp::screenAdded, this, &UnlockApp::desktopResize= d); } = UnlockApp::~UnlockApp() @@ -95,7 +95,7 @@ void UnlockApp::initialize() // are not processed in quick (and confusing) succession) m_resetRequestIgnoreTimer->setSingleShot(true); m_resetRequestIgnoreTimer->setInterval(2000); - connect(m_resetRequestIgnoreTimer, SIGNAL(timeout()), this, SLOT(reset= RequestIgnore())); + connect(m_resetRequestIgnoreTimer, &QTimer::timeout, this, &UnlockApp:= :resetRequestIgnore); = // disable DrKonqi as the crash dialog blocks the restart of the locker KCrash::setDrKonqiEnabled(false); @@ -146,8 +146,7 @@ void UnlockApp::desktopResized() connect(QGuiApplication::screens()[i], SIGNAL(destroyed(QObject*))= , SLOT(desktopResized())); // create the view QQuickView *view =3D new QQuickView(); - connect(view, SIGNAL(statusChanged(QQuickView::Status)), - this, SLOT(viewStatusChanged(QQuickView::Status))); + connect(view, &QQuickView::statusChanged, this, &UnlockApp::viewSt= atusChanged); = if (!m_testing) { view->setFlags(Qt::X11BypassWindowManagerHint); @@ -416,4 +415,3 @@ void UnlockApp::setNoLock(bool noLock) = } // namespace = -#include "greeterapp.moc" diff --git a/ksmserver/screenlocker/greeter/sessions.cpp b/ksmserver/screen= locker/greeter/sessions.cpp index 8aaf09d..5f831d5 100644 --- a/ksmserver/screenlocker/greeter/sessions.cpp +++ b/ksmserver/screenlocker/greeter/sessions.cpp @@ -159,4 +159,3 @@ void SessionSwitching::activateSession(int index) = } = -#include "sessions.moc" diff --git a/ksmserver/screenlocker/interface.cpp b/ksmserver/screenlocker/= interface.cpp index d8c20f1..3ee3f01 100644 --- a/ksmserver/screenlocker/interface.cpp +++ b/ksmserver/screenlocker/interface.cpp @@ -48,12 +48,12 @@ Interface::Interface(KSldApp *parent) QDBusConnection::sessionBus().registerService(QLatin1String("org.kde.s= creensaver")); QDBusConnection::sessionBus().registerObject(QLatin1String("/ScreenSav= er"), this); QDBusConnection::sessionBus().registerObject(QLatin1String("/org/freed= esktop/ScreenSaver"), this); - connect(m_daemon, SIGNAL(locked()), SLOT(slotLocked())); - connect(m_daemon, SIGNAL(unlocked()), SLOT(slotUnlocked())); + connect(m_daemon, &KSldApp::locked, this, &Interface::slotLocked); + connect(m_daemon, &KSldApp::unlocked, this, &Interface::slotUnlocked); = m_serviceWatcher->setConnection(QDBusConnection::sessionBus()); m_serviceWatcher->setWatchMode(QDBusServiceWatcher::WatchForUnregistra= tion); - connect(m_serviceWatcher, SIGNAL(serviceUnregistered(QString)), SLOT(s= erviceUnregistered(QString))); + connect(m_serviceWatcher, &QDBusServiceWatcher::serviceUnregistered, t= his, &Interface::serviceUnregistered); = // Also receive updates triggered through the DBus (from powerdevil) s= ee Bug #177123 QStringList modules; @@ -212,4 +212,3 @@ void Interface::sendLockReplies() = } // namespace = -#include "interface.moc" diff --git a/ksmserver/screenlocker/ksldapp.cpp b/ksmserver/screenlocker/ks= ldapp.cpp index 04c7db3..22698ce 100644 --- a/ksmserver/screenlocker/ksldapp.cpp +++ b/ksmserver/screenlocker/ksldapp.cpp @@ -208,7 +208,7 @@ void KSldApp::initialize() = void KSldApp::configure() { - KScreenSaverSettings::self()->readConfig(); + KScreenSaverSettings::self()->load(); // idle support if (m_idleId) { KIdleTime::instance()->removeIdleTimeout(m_idleId); @@ -422,4 +422,3 @@ void KSldApp::uninhibit() } = } // namespace -#include "ksldapp.moc" diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index 5bdb7fd..d4fc6b5 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -71,6 +71,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS= IN THE SOFTWARE. #include #include #include +#include = #include #include @@ -82,7 +83,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS= IN THE SOFTWARE. #include #include = -#include "server.moc" = // must go after #include #ifdef COMPILE_SCREEN_LOCKER @@ -133,8 +133,8 @@ KProcess* KSMServer::startApplication( const QStringLis= t& cmd, const QString& cl KProcess* process =3D new KProcess( this ); *process << command; // make it auto-delete - connect( process, SIGNAL(error(QProcess::ProcessError)), process, = SLOT(deleteLater())); - connect( process, SIGNAL(finished(int,QProcess::ExitStatus)), proc= ess, SLOT(deleteLater())); + connect(process, static_cast(&KProcess::error), process, &KProcess::deleteLater); + connect(process, static_cast(&KProcess::finished), process, &KProcess::deleteLater); process->start(); return process; } else { @@ -641,8 +641,8 @@ KSMServer::KSMServer( const QString& windowManager, boo= l _only_local, bool locks //KGlobal::dirs()->addResourceType( "windowmanagers", "data", "ksmserv= er/windowmanagers" ); selectWm( windowManager ); = - connect( &startupSuspendTimeoutTimer, SIGNAL(timeout()), SLOT(startupS= uspendTimeout())); - connect( &pendingShutdown, SIGNAL(timeout()), SLOT(pendingShutdownTime= out())); + connect(&startupSuspendTimeoutTimer, &QTimer::timeout, this, &KSMServe= r::startupSuspendTimeout); + connect(&pendingShutdown, &QTimer::timeout, this, &KSMServer::pendingS= hutdownTimeout); = only_local =3D _only_local; #ifdef HAVE__ICETRANSNOLISTEN @@ -720,7 +720,7 @@ KSMServer::KSMServer( const QString& windowManager, boo= l _only_local, bool locks fcntl( IceGetListenConnectionNumber( listenObjs[i] ), F_SETFD, FD_= CLOEXEC ); con =3D new KSMListener( listenObjs[i] ); listener.append( con ); - connect( con, SIGNAL(activated(int)), this, SLOT(newConnection(int= )) ); + connect(con, &KSMListener::activated, this, &KSMServer::newConnect= ion); } = signal(SIGHUP, sighandler); @@ -728,9 +728,9 @@ KSMServer::KSMServer( const QString& windowManager, boo= l _only_local, bool locks signal(SIGINT, sighandler); signal(SIGPIPE, SIG_IGN); = - connect( &protectionTimer, SIGNAL(timeout()), this, SLOT(protectionTim= eout()) ); - connect( &restoreTimer, SIGNAL(timeout()), this, SLOT(tryRestoreNext()= ) ); - connect( qApp, SIGNAL(aboutToQuit()), this, SLOT(cleanUp()) ); + connect(&protectionTimer, &QTimer::timeout, this, &KSMServer::protecti= onTimeout); + connect(&restoreTimer, &QTimer::timeout, this, &KSMServer::tryRestoreN= ext); + connect(qApp, &QApplication::aboutToQuit, this, &KSMServer::cleanUp); } = KSMServer::~KSMServer() @@ -771,7 +771,7 @@ void KSMServer::cleanUp() void* KSMServer::watchConnection( IceConn iceConn ) { KSMConnection* conn =3D new KSMConnection( iceConn ); - connect( conn, SIGNAL(activated(int)), this, SLOT(processData(int)) ); + connect(conn, &KSMConnection::activated, this, &KSMServer::processData= ); return (void*) conn; } = @@ -1048,22 +1048,22 @@ void KSMServer::setupShortcuts() a =3D actionCollection->addAction(QStringLiteral("Log Out")); a->setText(i18n("Log Out")); KGlobalAccel::self()->setShortcut(a, QList() << Qt::= ALT+Qt::CTRL+Qt::Key_Delete); - connect(a, SIGNAL(triggered(bool)), SLOT(defaultLogout())); + connect(a, &QAction::triggered, this, &KSMServer::defaultLogout); = a =3D actionCollection->addAction(QStringLiteral("Log Out Without = Confirmation")); a->setText(i18n("Log Out Without Confirmation")); KGlobalAccel::self()->setShortcut(a, QList() << Qt::= ALT+Qt::CTRL+Qt::SHIFT+Qt::Key_Delete); - connect(a, SIGNAL(triggered(bool)), SLOT(logoutWithoutConfirmation= ())); + connect(a, &QAction::triggered, this, &KSMServer::logoutWithoutCon= firmation); = a =3D actionCollection->addAction(QStringLiteral("Halt Without Con= firmation")); a->setText(i18n("Halt Without Confirmation")); KGlobalAccel::self()->setShortcut(a, QList() << Qt::= ALT+Qt::CTRL+Qt::SHIFT+Qt::Key_PageDown); - connect(a, SIGNAL(triggered(bool)), SLOT(haltWithoutConfirmation()= )); + connect(a, &QAction::triggered, this, &KSMServer::haltWithoutConfi= rmation); = a =3D actionCollection->addAction(QStringLiteral("Reboot Without C= onfirmation")); a->setText(i18n("Reboot Without Confirmation")); KGlobalAccel::self()->setShortcut(a, QList() << Qt::= ALT+Qt::CTRL+Qt::SHIFT+Qt::Key_PageUp); - connect(a, SIGNAL(triggered(bool)), SLOT(rebootWithoutConfirmation= ())); + connect(a, &QAction::triggered, this, &KSMServer::rebootWithoutCon= firmation); } } = diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp index 73f345e..d4cedcb 100644 --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -62,7 +62,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS= IN THE SOFTWARE. #include = //#include "logouteffect.h" -#include "shutdowndlg.moc" = #include #include