[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kcontrol/display
From: Maks Orlovich <mo002j () mail ! rochester ! edu>
Date: 2002-03-03 4:23:35
[Download RAW message or body]
kdebase/kcontrol/display krdb.cpp,1.20,1.21
Author: orlovich
Sun Mar 3 05:23:35 CET 2002
In directory office:/tmp/cvs-serv21128
Modified Files:
krdb.cpp
Log Message:
Export KDE paths for Qt style plugins into qtrc.
OKd by Cristian Tibirna; looked over by Danimo, Puetzk, and Tronical.
Intended primarily as an imperfect (some apps might get a Qt style on first
startup if run before krdb/I am not sure of korganizer)
but a safe workaround for the QStyleFactory-ignoring-kapp-set-
libraryPath Qt bug (Which is fixed in recent Qt snapshots);
but it is also important for applying KDE styles to qt-only libs,
and would probably need to be done for that, anyway.
--- krdb.cpp 2002/02/19 07:16:01 1.19
+++ krdb.cpp 2002/02/28 00:29:42
@@ -63,10 +63,36 @@ static void applyQtStyles(bool active)
bool found;
QStringList actcg, inactcg, discg;
QString font,style;
+
+
+ { //To ensure they get written in time..
+ QSettings settings;
+
+ //###### Write out library path regardless of mode -- workaround for Qt \
3.0.2 (3.0.1?) bug; perhaps remove for newer Qt.. + //On the other hand, \
whether Qt gets KDE widget settings or not really shouldn't be determined by + \
//"Apply KDE Colors to non-KDE Apps", so possibly the widgetStyle setting needs to be \
done unconditionally as well. +
+ //Read qt library path..
+ QStringList pathorig = settings.readListEntry("/qt/libraryPath", ':');
+ //and merge in KDE one..
+ QStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
+ QStringList::Iterator it = plugins.begin();
+ while (it != plugins.end()) {
+ //Check whether *it is already there... Sigh, this is quadratic..
+ //But the paths are short enough to make a faster datastructure
+ //a waste..
+ if (pathorig.contains( *it ) == 0)
+ pathorig.append( *it );
+ ++it;
+ }
+
+ settings.writeEntry("/qt/libraryPath", pathorig, ':');
+ }
+
+
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic