Port Aurorae from KDebug to QDebug
Note: deco plugins have their own debug area.
This commit is contained in:
parent
987fd41d24
commit
e1d89313cb
4 changed files with 8 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
|||
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1216)
|
||||
add_subdirectory( aurorae )
|
||||
if(KWIN_BUILD_OXYGEN)
|
||||
add_subdirectory( oxygen )
|
||||
|
|
|
@ -16,7 +16,6 @@ kde4_add_plugin(kwin3_aurorae ${kwin3_aurorae_PART_SRCS})
|
|||
target_link_libraries(kwin3_aurorae
|
||||
KF5::KConfigCore
|
||||
KF5::KService
|
||||
${KDE4Support_LIBRARIES} # KGlobal
|
||||
Qt5::Declarative
|
||||
kdecorations
|
||||
)
|
||||
|
|
|
@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "config-kwin.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QtDeclarative/QDeclarativeComponent>
|
||||
#include <QtDeclarative/QDeclarativeContext>
|
||||
#include <QtDeclarative/QDeclarativeEngine>
|
||||
|
@ -30,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <KConfig>
|
||||
#include <KConfigGroup>
|
||||
#include <KDebug>
|
||||
#include <KGlobal>
|
||||
#include <KPluginInfo>
|
||||
#include <KServiceTypeTrader>
|
||||
|
@ -106,13 +106,13 @@ void AuroraeFactory::initQML(const KConfigGroup &group)
|
|||
{
|
||||
// try finding the QML package
|
||||
const QString themeName = group.readEntry("ThemeName", "kwin4_decoration_qml_plastik");
|
||||
kDebug(1212) << "Trying to load QML Decoration " << themeName;
|
||||
qDebug() << "Trying to load QML Decoration " << themeName;
|
||||
const QString internalname = themeName.toLower();
|
||||
|
||||
QString constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(internalname);
|
||||
KService::List offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/Decoration"), constraint);
|
||||
if (offers.isEmpty()) {
|
||||
kError(1212) << "Couldn't find QML Decoration " << themeName << endl;
|
||||
qCritical() << "Couldn't find QML Decoration " << themeName << endl;
|
||||
// TODO: what to do in error case?
|
||||
return;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void AuroraeFactory::initQML(const KConfigGroup &group)
|
|||
const QString scriptName = service->property(QStringLiteral("X-Plasma-MainScript")).toString();
|
||||
const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/decorations/") + pluginName + QStringLiteral("/contents/") + scriptName);
|
||||
if (file.isNull()) {
|
||||
kDebug(1212) << "Could not find script file for " << pluginName;
|
||||
qDebug() << "Could not find script file for " << pluginName;
|
||||
// TODO: what to do in error case?
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
#include "auroraetheme.h"
|
||||
#include "themeconfig.h"
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
#include <QHash>
|
||||
#include <QStandardPaths>
|
||||
// KDE
|
||||
#include <KDE/KConfig>
|
||||
#include <KDE/KConfigGroup>
|
||||
#include <KDE/KDebug>
|
||||
#include <KDE/KGlobal>
|
||||
|
||||
namespace Aurorae {
|
||||
|
@ -73,7 +73,7 @@ void AuroraeThemePrivate::initButtonFrame(AuroraeButtonType type)
|
|||
if (!path.isEmpty()) {
|
||||
pathes[ type ] = path;
|
||||
} else {
|
||||
kDebug(1216) << "No button for: " << AuroraeTheme::mapButtonToName(type);
|
||||
qDebug() << "No button for: " << AuroraeTheme::mapButtonToName(type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ void AuroraeTheme::loadTheme(const QString &name, const KConfig &config)
|
|||
path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, file);
|
||||
}
|
||||
if (path.isEmpty()) {
|
||||
kDebug(1216) << "Could not find decoration svg: aborting";
|
||||
qDebug() << "Could not find decoration svg: aborting";
|
||||
d->themeName.clear();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue