[121378] trunk/dports/kde/kdelibs4

nicos at macports.org nicos at macports.org
Tue Jun 24 09:23:45 PDT 2014


Revision: 121378
          https://trac.macports.org/changeset/121378
Author:   nicos at macports.org
Date:     2014-06-24 09:23:44 -0700 (Tue, 24 Jun 2014)
Log Message:
-----------
kdelibs4: using back raster graphics by default

Modified Paths:
--------------
    trunk/dports/kde/kdelibs4/Portfile
    trunk/dports/kde/kdelibs4/files/patch-kapplications-raster.diff

Modified: trunk/dports/kde/kdelibs4/Portfile
===================================================================
--- trunk/dports/kde/kdelibs4/Portfile	2014-06-24 16:02:37 UTC (rev 121377)
+++ trunk/dports/kde/kdelibs4/Portfile	2014-06-24 16:23:44 UTC (rev 121378)
@@ -6,7 +6,7 @@
 
 name                kdelibs4
 version             4.12.5
-revision            1
+revision            2
 categories          kde kde4
 maintainers         nicos
 license             LGPL-2+ GPL-2+ BSD
@@ -60,12 +60,9 @@
                     patch-cmake-modules-FindPhonon.cmake.diff \
                     patch-cmake-modules-FindQt4.cmake.diff \
                     patch-cmake-modules-KDE4Macros.cmake.diff \
-                    patch-removeFindFlex.diff
+                    patch-removeFindFlex.diff \
+                    patch-kapplications-raster.diff
 
-#The patch forcing raster graphics (speeding up some applications) causes others to 
-#crash (see for example kmymoney in #43767)
-#                    patch-kapplications-raster.diff
-
 patch.pre_args      -p1
 
 # explicitly define certain headers and libraries, to avoid

Modified: trunk/dports/kde/kdelibs4/files/patch-kapplications-raster.diff
===================================================================
--- trunk/dports/kde/kdelibs4/files/patch-kapplications-raster.diff	2014-06-24 16:02:37 UTC (rev 121377)
+++ trunk/dports/kde/kdelibs4/files/patch-kapplications-raster.diff	2014-06-24 16:23:44 UTC (rev 121378)
@@ -1,12 +1,79 @@
---- kdelibs-4.12.5/kdeui/kernel/kapplication.cpp.orig	2014-04-28 13:37:51.000000000 +0900
-+++ kdelibs-4.12.5/kdeui/kernel/kapplication.cpp	2014-05-17 00:04:51.000000000 +0900
-@@ -409,6 +409,9 @@
+diff --git a/kdeui/kernel/kapplication.cpp b/kdeui/kernel/kapplication.cpp
+index b093034..3e1b2f2 100644
+--- a/kdeui/kernel/kapplication.cpp
++++ b/kdeui/kernel/kapplication.cpp
+@@ -207,7 +207,11 @@ public:
+   QString sessionConfigName() const;
+   void init(bool GUIenabled=true);
+   void parseCommandLine( ); // Handle KDE arguments (Using KCmdLineArgs)
++#ifdef Q_OS_MAC
++  static void preqapplicationhack(bool GUIenabled = true);
++#else
+   static void preqapplicationhack();
++#endif
+   static void preread_app_startup_id();
+   void read_app_startup_id();
+ 
+@@ -342,7 +346,11 @@ static SmcConn mySmcConnection = 0;
+ #endif
+ 
+ KApplication::KApplication(bool GUIenabled)
++#ifdef Q_OS_MAC
++    : QApplication((KApplicationPrivate::preqapplicationhack(GUIenabled),KCmdLineArgs::qtArgc()), KCmdLineArgs::qtArgv(), GUIenabled),
++#else
+     : QApplication((KApplicationPrivate::preqapplicationhack(),KCmdLineArgs::qtArgc()), KCmdLineArgs::qtArgv(), GUIenabled),
++#endif
+     d(new KApplicationPrivate(this))
+ {
+     d->read_app_startup_id();
+@@ -402,10 +410,31 @@ KApplication::KApplication(Display *display, int& argc, char** argv, const QByte
+ }
+ #endif
+ 
++#ifdef Q_OS_MAC
++static bool useRaster = true;
++void KApplication::doNotUseRaster()
++{
++    useRaster = false;
++}
++#endif
++
+ // this function is called in KApplication ctors while evaluating arguments to QApplication ctor,
+ // i.e. before QApplication ctor is called
++#ifdef Q_OS_MAC
++void KApplicationPrivate::preqapplicationhack(bool GUIenabled)
++#else
+ void KApplicationPrivate::preqapplicationhack()
++#endif
+ {
++#ifdef Q_OS_MAC
++    // Setting env RasterOff avoids setting raster. Can be used for before/after
++    // testing and to work around an application failing when raster is set.
++    if (getenv("RasterOff") == NULL) {
++        if (useRaster && GUIenabled) {
++            QApplication::setGraphicsSystem(QString("raster"));
++        }
++    }
++#endif
      preread_app_startup_id();
  
      KGlobal::config(); // initialize qt plugin path (see KComponentDataPrivate::lazyInit)
-+#ifdef Q_WS_MAC
-+    QApplication::setGraphicsSystem("raster");
+diff --git a/kdeui/kernel/kapplication.h b/kdeui/kernel/kapplication.h
+index fa2ab26..cc21e76 100644
+--- a/kdeui/kernel/kapplication.h
++++ b/kdeui/kernel/kapplication.h
+@@ -403,6 +403,14 @@ public:
+    */
+   static bool loadedByKdeinit;
+ 
++#ifdef Q_OS_MAC
++  /**
++   * Use before creating KApplication in an app which fails with raster
++   * graphics, such as KMyMoney. Most KDE apps on OS X run better with raster.
++   */
++  static void doNotUseRaster();
 +#endif
- }
- 
- int KApplication::xioErrhandler( Display* dpy )
++
+ public Q_SLOTS:
+   /**
+    * Updates the last user action timestamp to the given time, or to the current time,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140624/dd5dc50c/attachment.html>


More information about the macports-changes mailing list