{"action":"created","issue":{"url":"https://api.github.com/repos/macports/macports-ports/issues/3022","repository_url":"https://api.github.com/repos/macports/macports-ports","labels_url":"https://api.github.com/repos/macports/macports-ports/issues/3022/labels{/name}","comments_url":"https://api.github.com/repos/macports/macports-ports/issues/3022/comments","events_url":"https://api.github.com/repos/macports/macports-ports/issues/3022/events","html_url":"https://github.com/macports/macports-ports/pull/3022","id":381350452,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMzQyOTI4","number":3022,"title":"qt4-mac/kdelibs4 : convert hardwired graphics system selection to use…","user":{"login":"RJVB","id":1756884,"node_id":"MDQ6VXNlcjE3NTY4ODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1756884?v=4","gravatar_id":"","url":"https://api.github.com/users/RJVB","html_url":"https://github.com/RJVB","followers_url":"https://api.github.com/users/RJVB/followers","following_url":"https://api.github.com/users/RJVB/following{/other_user}","gists_url":"https://api.github.com/users/RJVB/gists{/gist_id}","starred_url":"https://api.github.com/users/RJVB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RJVB/subscriptions","organizations_url":"https://api.github.com/users/RJVB/orgs","repos_url":"https://api.github.com/users/RJVB/repos","events_url":"https://api.github.com/users/RJVB/events{/privacy}","received_events_url":"https://api.github.com/users/RJVB/received_events","type":"User","site_admin":false},"labels":[{"id":598560120,"node_id":"MDU6TGFiZWw1OTg1NjAxMjA=","url":"https://api.github.com/repos/macports/macports-ports/labels/maintainer:%20requires%20approval","name":"maintainer: requires approval","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":{"login":"michaelld","id":157892,"node_id":"MDQ6VXNlcjE1Nzg5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/157892?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelld","html_url":"https://github.com/michaelld","followers_url":"https://api.github.com/users/michaelld/followers","following_url":"https://api.github.com/users/michaelld/following{/other_user}","gists_url":"https://api.github.com/users/michaelld/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelld/subscriptions","organizations_url":"https://api.github.com/users/michaelld/orgs","repos_url":"https://api.github.com/users/michaelld/repos","events_url":"https://api.github.com/users/michaelld/events{/privacy}","received_events_url":"https://api.github.com/users/michaelld/received_events","type":"User","site_admin":false},"assignees":[{"login":"michaelld","id":157892,"node_id":"MDQ6VXNlcjE1Nzg5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/157892?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelld","html_url":"https://github.com/michaelld","followers_url":"https://api.github.com/users/michaelld/followers","following_url":"https://api.github.com/users/michaelld/following{/other_user}","gists_url":"https://api.github.com/users/michaelld/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelld/subscriptions","organizations_url":"https://api.github.com/users/michaelld/orgs","repos_url":"https://api.github.com/users/michaelld/repos","events_url":"https://api.github.com/users/michaelld/events{/privacy}","received_events_url":"https://api.github.com/users/michaelld/received_events","type":"User","site_admin":false},{"login":"NicosPavlov","id":6189726,"node_id":"MDQ6VXNlcjYxODk3MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/6189726?v=4","gravatar_id":"","url":"https://api.github.com/users/NicosPavlov","html_url":"https://github.com/NicosPavlov","followers_url":"https://api.github.com/users/NicosPavlov/followers","following_url":"https://api.github.com/users/NicosPavlov/following{/other_user}","gists_url":"https://api.github.com/users/NicosPavlov/gists{/gist_id}","starred_url":"https://api.github.com/users/NicosPavlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicosPavlov/subscriptions","organizations_url":"https://api.github.com/users/NicosPavlov/orgs","repos_url":"https://api.github.com/users/NicosPavlov/repos","events_url":"https://api.github.com/users/NicosPavlov/events{/privacy}","received_events_url":"https://api.github.com/users/NicosPavlov/received_events","type":"User","site_admin":false}],"milestone":null,"comments":29,"created_at":"2018-11-15T21:39:18Z","updated_at":"2018-11-24T17:55:07Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/macports/macports-ports/pulls/3022","html_url":"https://github.com/macports/macports-ports/pull/3022","diff_url":"https://github.com/macports/macports-ports/pull/3022.diff","patch_url":"https://github.com/macports/macports-ports/pull/3022.patch"},"body":"…r option\r\n\r\nport:kdelibs4 used to set the Raster graphics system (unless prevented from doing so).\r\nThis causes graphics issues on newer OS versions. This change puts the graphics\r\nsystem under user control via Qt's own qtconfig utility. Port notes and a tooltip\r\nin qtconfig inform and guide the user.\r\n\r\n* modifies patch-kapplications-raster.diff (kdelibs4) so it does nothing under\r\n  normal conditions\r\n* patches the Qt4 buildsystem so qtconfig is built on Mac too\r\n* adds a GUI to select the graphics system to qtconfig\r\n* revbumps both ports\r\n\r\nCloses: https://trac.macports.org/ticket/57577\r\n"},"comment":{"url":"https://api.github.com/repos/macports/macports-ports/issues/comments/441384590","html_url":"https://github.com/macports/macports-ports/pull/3022#issuecomment-441384590","issue_url":"https://api.github.com/repos/macports/macports-ports/issues/3022","id":441384590,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTM4NDU5MA==","user":{"login":"RJVB","id":1756884,"node_id":"MDQ6VXNlcjE3NTY4ODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1756884?v=4","gravatar_id":"","url":"https://api.github.com/users/RJVB","html_url":"https://github.com/RJVB","followers_url":"https://api.github.com/users/RJVB/followers","following_url":"https://api.github.com/users/RJVB/following{/other_user}","gists_url":"https://api.github.com/users/RJVB/gists{/gist_id}","starred_url":"https://api.github.com/users/RJVB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RJVB/subscriptions","organizations_url":"https://api.github.com/users/RJVB/orgs","repos_url":"https://api.github.com/users/RJVB/repos","events_url":"https://api.github.com/users/RJVB/events{/privacy}","received_events_url":"https://api.github.com/users/RJVB/received_events","type":"User","site_admin":false},"created_at":"2018-11-24T17:55:07Z","updated_at":"2018-11-24T17:55:07Z","author_association":"CONTRIBUTOR","body":"Below is a new version of the kapplication raster patch that restores the old behaviour for users who have not made any changes through qtconfig:\r\n\r\n```\r\ndiff --git a/kdeui/kernel/kapplication.cpp b/kdeui/kernel/kapplication.cpp\r\nindex b093034..3e1b2f2 100644\r\n--- a/kdeui/kernel/kapplication.cpp\r\n+++ b/kdeui/kernel/kapplication.cpp\r\n@@ -207,7 +207,11 @@ public:\r\n   QString sessionConfigName() const;\r\n   void init(bool GUIenabled=true);\r\n   void parseCommandLine( ); // Handle KDE arguments (Using KCmdLineArgs)\r\n+#ifdef Q_OS_MAC\r\n+  static void preqapplicationhack(bool GUIenabled = true);\r\n+#else\r\n   static void preqapplicationhack();\r\n+#endif\r\n   static void preread_app_startup_id();\r\n   void read_app_startup_id();\r\n \r\n@@ -342,7 +346,11 @@ static SmcConn mySmcConnection = 0;\r\n #endif\r\n \r\n KApplication::KApplication(bool GUIenabled)\r\n+#ifdef Q_OS_MAC\r\n+    : QApplication((KApplicationPrivate::preqapplicationhack(GUIenabled),KCmdLineArgs::qtArgc()), KCmdLineArgs::qtArgv(), GUIenabled),\r\n+#else\r\n     : QApplication((KApplicationPrivate::preqapplicationhack(),KCmdLineArgs::qtArgc()), KCmdLineArgs::qtArgv(), GUIenabled),\r\n+#endif\r\n     d(new KApplicationPrivate(this))\r\n {\r\n     d->read_app_startup_id();\r\n@@ -402,10 +432,39 @@ KApplication::KApplication(Display *display, int& argc, char** argv, const QByte\r\n }\r\n #endif\r\n \r\n+#ifdef Q_OS_MAC\r\n+static bool useRaster = true;\r\n+void KApplication::doNotUseRaster()\r\n+{\r\n+    useRaster = false;\r\n+}\r\n+#endif\r\n+\r\n // this function is called in KApplication ctors while evaluating arguments to QApplication ctor,\r\n // i.e. before QApplication ctor is called\r\n+#ifdef Q_OS_MAC\r\n+void KApplicationPrivate::preqapplicationhack(bool GUIenabled)\r\n+#else\r\n void KApplicationPrivate::preqapplicationhack()\r\n+#endif\r\n {\r\n+#ifdef Q_OS_MAC\r\n+    // Setting env RasterOff avoids setting raster. Can be used for before/after\r\n+    // testing and to work around an application failing when raster is set.\r\n+\r\n+    // Fetch the default graphics system from Qt's settings store managed via qtconfig\r\n+    QSettings settings(QSettings::UserScope, QLatin1String(\"Trolltech\"));\r\n+    settings.beginGroup(QLatin1String(\"Qt\"));\r\n+    const QString defaultGraphicsSystem = settings.value(QLatin1String(\"DefaultGraphicsSystem\")).toString();\r\n+    if (defaultGraphicsSystem.isNull() || defaultGraphicsSystem.isEmpty()) {\r\n+        // only force raster mode here when not overriden via qtconfig or one of our own mechanisms\r\n+        if (getenv(\"RasterOff\") == NULL) {\r\n+            if (useRaster && GUIenabled) {\r\n+                QApplication::setGraphicsSystem(QString(\"raster\"));\r\n+            }\r\n+        }\r\n+    }\r\n+#endif\r\n     preread_app_startup_id();\r\n \r\n     KGlobal::config(); // initialize qt plugin path (see KComponentDataPrivate::lazyInit)\r\ndiff --git a/kdeui/kernel/kapplication.h b/kdeui/kernel/kapplication.h\r\nindex fa2ab26..cc21e76 100644\r\n--- a/kdeui/kernel/kapplication.h\r\n+++ b/kdeui/kernel/kapplication.h\r\n@@ -403,6 +403,14 @@ public:\r\n    */\r\n   static bool loadedByKdeinit;\r\n \r\n+#ifdef Q_OS_MAC\r\n+  /**\r\n+   * Use before creating KApplication in an app which fails with raster\r\n+   * graphics, such as KMyMoney. Most KDE apps on OS X run better with raster.\r\n+   */\r\n+  static void doNotUseRaster();\r\n+#endif\r\n+\r\n public Q_SLOTS:\r\n   /**\r\n    * Updates the last user action timestamp to the given time, or to the current time,\r\n```"}}
{"actor":{"display_login":"RJVB"}}