Merge remote-tracking branch 'origin/KDE/4.10' into master

Conflicts:
	kwin/scripting/scripting.cpp
	powerdevil/daemon/actions/bundled/powerdevildimdisplayaction.desktop
	solid-actions-kcm/device-actions/solid-device-SerialInterface.desktop
This commit is contained in:
Oliver Henshaw 2013-05-28 17:36:53 +01:00
commit 47acf4ee9a
4 changed files with 21 additions and 14 deletions

View file

@ -88,8 +88,13 @@ void AuroraeFactory::initAurorae(KConfig &conf, KConfigGroup &group)
m_theme->setButtonSize((KDecorationDefines::BorderSize)themeGroup.readEntry<int>("ButtonSize", KDecorationDefines::BorderNormal)); m_theme->setButtonSize((KDecorationDefines::BorderSize)themeGroup.readEntry<int>("ButtonSize", KDecorationDefines::BorderNormal));
m_theme->setTabDragMimeType(tabDragMimeType()); m_theme->setTabDragMimeType(tabDragMimeType());
// setup the QML engine // setup the QML engine
foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) { /* use logic from KDeclarative::setupBindings():
m_engine->addImportPath(importPath); "addImportPath adds the path at the beginning, so to honour user's
paths we need to traverse the list in reverse order" */
QStringListIterator paths(KGlobal::dirs()->findDirs("module", "imports"));
paths.toBack();
while (paths.hasPrevious()) {
m_engine->addImportPath(paths.previous());
} }
m_component->loadUrl(QUrl(KStandardDirs::locate("data", "kwin/aurorae/aurorae.qml"))); m_component->loadUrl(QUrl(KStandardDirs::locate("data", "kwin/aurorae/aurorae.qml")));
m_engine->rootContext()->setContextProperty("auroraeTheme", m_theme); m_engine->rootContext()->setContextProperty("auroraeTheme", m_theme);
@ -122,8 +127,13 @@ void AuroraeFactory::initQML(const KConfigGroup &group)
} }
m_engineType = QMLEngine; m_engineType = QMLEngine;
// setup the QML engine // setup the QML engine
foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) { /* use logic from KDeclarative::setupBindings():
m_engine->addImportPath(importPath); "addImportPath adds the path at the beginning, so to honour user's
paths we need to traverse the list in reverse order" */
QStringListIterator paths(KGlobal::dirs()->findDirs("module", "imports"));
paths.toBack();
while (paths.hasPrevious()) {
m_engine->addImportPath(paths.previous());
} }
m_component->loadUrl(QUrl::fromLocalFile(file)); m_component->loadUrl(QUrl::fromLocalFile(file));
m_themeName = themeName; m_themeName = themeName;

View file

@ -135,8 +135,13 @@ void KWinDecorationModule::init()
m_proxyModel->setSourceModel(m_model); m_proxyModel->setSourceModel(m_model);
m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
m_ui->decorationList->setResizeMode(QDeclarativeView::SizeRootObjectToView); m_ui->decorationList->setResizeMode(QDeclarativeView::SizeRootObjectToView);
foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) { /* use logic from KDeclarative::setupBindings():
m_ui->decorationList->engine()->addImportPath(importPath); "addImportPath adds the path at the beginning, so to honour user's
paths we need to traverse the list in reverse order" */
QStringListIterator paths(KGlobal::dirs()->findDirs("module", "imports"));
paths.toBack();
while (paths.hasPrevious()) {
m_ui->decorationList->engine()->addImportPath(paths.previous());
} }
m_ui->decorationList->rootContext()->setContextProperty("decorationModel", m_proxyModel); m_ui->decorationList->rootContext()->setContextProperty("decorationModel", m_proxyModel);
m_ui->decorationList->rootContext()->setContextProperty("decorationBaseModel", m_model); m_ui->decorationList->rootContext()->setContextProperty("decorationBaseModel", m_model);

View file

@ -544,11 +544,6 @@ void KWin::DeclarativeScript::run()
if (running()) { if (running()) {
return; return;
} }
foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) {
m_engine->addImportPath(importPath);
}
// add read config // add read config
KDeclarative kdeclarative; KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(m_engine); kdeclarative.setDeclarativeEngine(m_engine);

View file

@ -148,9 +148,6 @@ DeclarativeView::DeclarativeView(QAbstractItemModel *model, TabBoxConfig::TabBox
QPalette pal = palette(); QPalette pal = palette();
pal.setColor(backgroundRole(), Qt::transparent); pal.setColor(backgroundRole(), Qt::transparent);
setPalette(pal); setPalette(pal);
foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) {
engine()->addImportPath(importPath);
}
engine()->addImageProvider(QLatin1String("client"), new ImageProvider(model)); engine()->addImageProvider(QLatin1String("client"), new ImageProvider(model));
KDeclarative kdeclarative; KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(engine()); kdeclarative.setDeclarativeEngine(engine());