some refactoring, prepare to moving to qt5 style logging

This commit is contained in:
arcan1s
2015-08-28 00:15:25 +03:00
parent 8228d1d06b
commit 466faf53fa
8 changed files with 59 additions and 130 deletions

View File

@ -50,9 +50,9 @@ DPAdds::DPAdds(QObject *parent)
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
debug = (debugEnv == QString("yes"));
connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), this, SLOT(changeDesktop(int)));
connect(KWindowSystem::self(), SIGNAL(windowAdded(WId)), this, SLOT(changeWindowList(WId)));
connect(KWindowSystem::self(), SIGNAL(windowRemoved(WId)), this, SLOT(changeWindowList(WId)));
connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), this, SIGNAL(desktopChanged()));
connect(KWindowSystem::self(), SIGNAL(windowAdded(WId)), this, SIGNAL(windowListChanged()));
connect(KWindowSystem::self(), SIGNAL(windowRemoved(WId)), this, SIGNAL(windowListChanged()));
}
@ -400,24 +400,6 @@ void DPAdds::setCurrentDesktop(const int desktop) const
}
void DPAdds::changeDesktop(const int desktop) const
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop;
emit(desktopChanged());
}
void DPAdds::changeWindowList(const WId window) const
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Window" << window;
emit(windowListChanged());
}
DPAdds::DesktopWindowsInfo DPAdds::getInfoByDesktop(const int desktop) const
{
if (debug) qDebug() << PDEBUG;