[Uml-devel] KDE/kdesdk/umbrello/umbrello
Gopala Krishna A
krishna.ggk at gmail.com
Fri Jun 6 08:15:02 UTC 2008
SVN commit 817524 by gopala:
Fixed the nasty font rendering bug in the menus/toolbars caused due to creation of QFont objects before creation of QApplication
object.
CCMAIL:umbrello-devel at kde.org
M +17 -9 optionstate.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/optionstate.cpp #817523:817524
@@ -5,23 +5,31 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2006 *
+ * copyright (C) 2008 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
#include "optionstate.h"
+#include <kglobal.h>
namespace Settings{
-OptionState pd_optionState;
+ /*
+ * Impt: This ensures creation of OptionState object after
+ * QApplication there by avoiding nasty font rendering issues
+ * which occurs due to creation of QFont objects before
+ * QApplication object is created.
+ */
+ K_GLOBAL_STATIC(OptionState, opState);
-OptionState& getOptionState() {
- return pd_optionState;
-}
+ OptionState& getOptionState()
+ {
+ return *opState;
+ }
-void setOptionState(const OptionState& optstate) {
- pd_optionState = optstate;
-}
+ void setOptionState(const OptionState& optstate)
+ {
+ *opState = optstate;
+ }
} // namespace Settings
-
More information about the umbrello-devel
mailing list