Changeset 121378 for trunk/dports/kde


Ignore:
Timestamp:
Jun 24, 2014, 4:23:44 PM (5 years ago)
Author:
nicos@…
Message:

kdelibs4: using back raster graphics by default

Location:
trunk/dports/kde/kdelibs4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/kde/kdelibs4/Portfile

    r121377 r121378  
    77name                kdelibs4
    88version             4.12.5
    9 revision            1
     9revision            2
    1010categories          kde kde4
    1111maintainers         nicos
     
    6161                    patch-cmake-modules-FindQt4.cmake.diff \
    6262                    patch-cmake-modules-KDE4Macros.cmake.diff \
    63                     patch-removeFindFlex.diff
    64 
    65 #The patch forcing raster graphics (speeding up some applications) causes others to
    66 #crash (see for example kmymoney in #43767)
    67 #                    patch-kapplications-raster.diff
     63                    patch-removeFindFlex.diff \
     64                    patch-kapplications-raster.diff
    6865
    6966patch.pre_args      -p1
  • trunk/dports/kde/kdelibs4/files/patch-kapplications-raster.diff

    r120203 r121378  
    1 --- kdelibs-4.12.5/kdeui/kernel/kapplication.cpp.orig   2014-04-28 13:37:51.000000000 +0900
    2 +++ kdelibs-4.12.5/kdeui/kernel/kapplication.cpp        2014-05-17 00:04:51.000000000 +0900
    3 @@ -409,6 +409,9 @@
     1diff --git a/kdeui/kernel/kapplication.cpp b/kdeui/kernel/kapplication.cpp
     2index b093034..3e1b2f2 100644
     3--- a/kdeui/kernel/kapplication.cpp
     4+++ b/kdeui/kernel/kapplication.cpp
     5@@ -207,7 +207,11 @@ public:
     6   QString sessionConfigName() const;
     7   void init(bool GUIenabled=true);
     8   void parseCommandLine( ); // Handle KDE arguments (Using KCmdLineArgs)
     9+#ifdef Q_OS_MAC
     10+  static void preqapplicationhack(bool GUIenabled = true);
     11+#else
     12   static void preqapplicationhack();
     13+#endif
     14   static void preread_app_startup_id();
     15   void read_app_startup_id();
     16 
     17@@ -342,7 +346,11 @@ static SmcConn mySmcConnection = 0;
     18 #endif
     19 
     20 KApplication::KApplication(bool GUIenabled)
     21+#ifdef Q_OS_MAC
     22+    : QApplication((KApplicationPrivate::preqapplicationhack(GUIenabled),KCmdLineArgs::qtArgc()), KCmdLineArgs::qtArgv(), GUIenabled),
     23+#else
     24     : QApplication((KApplicationPrivate::preqapplicationhack(),KCmdLineArgs::qtArgc()), KCmdLineArgs::qtArgv(), GUIenabled),
     25+#endif
     26     d(new KApplicationPrivate(this))
     27 {
     28     d->read_app_startup_id();
     29@@ -402,10 +410,31 @@ KApplication::KApplication(Display *display, int& argc, char** argv, const QByte
     30 }
     31 #endif
     32 
     33+#ifdef Q_OS_MAC
     34+static bool useRaster = true;
     35+void KApplication::doNotUseRaster()
     36+{
     37+    useRaster = false;
     38+}
     39+#endif
     40+
     41 // this function is called in KApplication ctors while evaluating arguments to QApplication ctor,
     42 // i.e. before QApplication ctor is called
     43+#ifdef Q_OS_MAC
     44+void KApplicationPrivate::preqapplicationhack(bool GUIenabled)
     45+#else
     46 void KApplicationPrivate::preqapplicationhack()
     47+#endif
     48 {
     49+#ifdef Q_OS_MAC
     50+    // Setting env RasterOff avoids setting raster. Can be used for before/after
     51+    // testing and to work around an application failing when raster is set.
     52+    if (getenv("RasterOff") == NULL) {
     53+        if (useRaster && GUIenabled) {
     54+            QApplication::setGraphicsSystem(QString("raster"));
     55+        }
     56+    }
     57+#endif
    458     preread_app_startup_id();
    559 
    660     KGlobal::config(); // initialize qt plugin path (see KComponentDataPrivate::lazyInit)
    7 +#ifdef Q_WS_MAC
    8 +    QApplication::setGraphicsSystem("raster");
     61diff --git a/kdeui/kernel/kapplication.h b/kdeui/kernel/kapplication.h
     62index fa2ab26..cc21e76 100644
     63--- a/kdeui/kernel/kapplication.h
     64+++ b/kdeui/kernel/kapplication.h
     65@@ -403,6 +403,14 @@ public:
     66    */
     67   static bool loadedByKdeinit;
     68 
     69+#ifdef Q_OS_MAC
     70+  /**
     71+   * Use before creating KApplication in an app which fails with raster
     72+   * graphics, such as KMyMoney. Most KDE apps on OS X run better with raster.
     73+   */
     74+  static void doNotUseRaster();
    975+#endif
    10  }
    11  
    12  int KApplication::xioErrhandler( Display* dpy )
     76+
     77 public Q_SLOTS:
     78   /**
     79    * Updates the last user action timestamp to the given time, or to the current time,
Note: See TracChangeset for help on using the changeset viewer.