summaryrefslogtreecommitdiffstats
path: root/kdecore/kapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdecore/kapplication.cpp')
-rw-r--r--kdecore/kapplication.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index bad196482..07260813c 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -1510,15 +1510,29 @@ void KApplication::parseCommandLine( )
if (args->isSet("style"))
{
+ TQStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
+ TQStringList::Iterator itp = plugins.begin();
+ while (itp != plugins.end()) {
+ addLibraryPath( *itp );
+ ++itp;
+ }
+
TQStringList styles = TQStyleFactory::keys();
TQString reqStyle(args->getOption("style").lower());
- for (TQStringList::ConstIterator it = styles.begin(); it != styles.end(); ++it)
+ TQStringList list = libraryPaths();
+ TQStringList::Iterator it = list.begin();
+ while( it != list.end() ) {
+ ++it;
+ }
+
+ for (TQStringList::ConstIterator it = styles.begin(); it != styles.end(); ++it) {
if ((*it).lower() == reqStyle)
{
d->overrideStyle = *it;
break;
}
+ }
if (d->overrideStyle.isEmpty())
fprintf(stderr, "%s", TQString(i18n("The style %1 was not found\n").arg(reqStyle)).local8Bit().data());