summary refs log tree commit diff
path: root/pkgs/development/libraries/kde-frameworks-5.17/ktexteditor/0001-no-qcoreapplication.patch
blob: def55bff9b23fbebf6a076a01fea231e747f33cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From dc50fffdc72b76498384ce2f9065c3757b786d71 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Wed, 14 Oct 2015 09:08:59 -0500
Subject: [PATCH] no qcoreapplication

---
 src/syntax/data/katehighlightingindexer.cpp | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/syntax/data/katehighlightingindexer.cpp b/src/syntax/data/katehighlightingindexer.cpp
index 3c63140..e3d5efe 100644
--- a/src/syntax/data/katehighlightingindexer.cpp
+++ b/src/syntax/data/katehighlightingindexer.cpp
@@ -51,19 +51,16 @@ QStringList readListing(const QString &fileName)
 
 int main(int argc, char *argv[])
 {
-    // get app instance
-    QCoreApplication app(argc, argv);
-
     // ensure enough arguments are passed
-    if (app.arguments().size() < 3)
+    if (argc < 3)
         return 1;
 
     // open schema
     QXmlSchema schema;
-    if (!schema.load(QUrl::fromLocalFile(app.arguments().at(2))))
+    if (!schema.load(QUrl::fromLocalFile(QString::fromLocal8Bit(argv[2]))))
         return 2;
 
-    const QString hlFilenamesListing = app.arguments().value(3);
+    const QString hlFilenamesListing = QString::fromLocal8Bit(argv[3]);
     if (hlFilenamesListing.isEmpty()) {
         return 1;
     }
@@ -147,7 +144,7 @@ int main(int argc, char *argv[])
         return anyError;
 
     // create outfile, after all has worked!
-    QFile outFile(app.arguments().at(1));
+    QFile outFile(QString::fromLocal8Bit(argv[1]));
     if (!outFile.open(QIODevice::WriteOnly | QIODevice::Truncate))
         return 7;
 
-- 
2.5.2