OSDN Git Service

generic: adjust to Katie changes
authorIvailo Monev <xakepa10@laimg.moc>
Sun, 2 Jun 2019 16:39:37 +0000 (16:39 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sun, 2 Jun 2019 16:39:37 +0000 (16:39 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
35 files changed:
ksnapshot/freeregiongrabber.cpp
ksnapshot/windowgrabber.cpp
ksystemlog/src/lib/kioLogFileReader.cpp
ksystemlog/src/lib/logViewExport.cpp
lokalize/src/catalog/gettextheader.cpp
lokalize/src/common/diff.cpp
lokalize/src/filesearch/filesearchtab.cpp
lokalize/src/filesearch/filesearchtab.h
lokalize/src/mergemode/mergeview.cpp
lokalize/src/tm/dbfilesmodel.cpp
lokalize/src/tm/jobs.cpp
lokalize/src/tm/tmmanager.cpp
lokalize/src/tm/tmtab.cpp
lokalize/src/tm/tmtab.h
lokalize/src/tm/tmview.cpp
print-manager/add-printer/PageAddPrinter.cpp
print-manager/add-printer/PageAddPrinter.h
print-manager/add-printer/PageChoosePrinters.cpp
print-manager/add-printer/PageChoosePrinters.h
print-manager/libkcups/JobModel.cpp
print-manager/libkcups/KCupsConnection.cpp
print-manager/libkcups/KCupsPrinter.h
print-manager/libkcups/KCupsRequest.cpp
print-manager/libkcups/KIppRequest.cpp
print-manager/libkcups/PPDModel.cpp
print-manager/libkcups/PrinterModel.cpp
print-manager/libkcups/SelectMakeModel.cpp
print-manager/libkcups/SelectMakeModel.h
print-manager/printer-manager-kcm/PrintKCM.cpp
print-manager/printer-manager-kcm/PrintKCM.h
print-manager/printer-manager-kcm/PrinterDescription.cpp
print-manager/printer-manager-kcm/PrinterDescription.h
print-manager/printqueue/PrintQueueUi.cpp
print-manager/printqueue/PrintQueueUi.h
yakuake/app/visualeventoverlay.cpp

index d6efe2d..28d60d5 100644 (file)
@@ -26,6 +26,7 @@
 #include <QDesktopWidget>
 #include <QToolTip>
 #include <QTimer>
+#include <QPen>
 #include <klocale.h>
 #include <KWindowSystem>
 
index e4c2b58..328c34e 100644 (file)
@@ -30,7 +30,7 @@
 #include <QPainter>
 #include <QPixmap>
 #include <QPoint>
-
+#include <QPen>
 #include <QtGui/qevent.h>
 
 #ifdef Q_WS_X11
index 607b4da..8fc8ce3 100644 (file)
@@ -125,12 +125,6 @@ void KioLogFileReader::dataReceived(KIO::Job* job, const QByteArray& data) {
        if (d->totalRead < d->fileJob->size()) {
                d->fileJob->read(READ_SIZE);
        }
-       else {
-               logDebug() << "Entire file read, beginning file watching..." << endl;
-               d->fileWatch->startScan();
-
-       }
-
 
        //logDebug() << "Data received : " << d->buffer << endl;
 
index 74ee87a..74d70a1 100644 (file)
@@ -23,8 +23,9 @@
 
 #include <QPainter>
 #include <QClipboard>
-#include <QtGui/QPrinter>
-#include <QtGui/QPrintDialog>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPen>
 
 #include <kapplication.h>
 #include <klocale.h>
index 29c5831..bea90d7 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <QProcess>
 #include <QString>
-#include <QStringBuilder>
 #include <QMap>
 #include <QTextCodec>
 
@@ -263,8 +262,8 @@ void updateHeader(QString& header,
     bool found=false;
     authorNameEmail=Settings::authorName();
     if (!Settings::authorEmail().isEmpty())
-        authorNameEmail+=(" <"%Settings::authorEmail()%'>');
-    temp="Last-Translator: "%authorNameEmail%"\\n";
+        authorNameEmail+=(" <" + Settings::authorEmail() + '>');
+    temp="Last-Translator: " + authorNameEmail + "\\n";
 
     QRegExp lt("^ *Last-Translator:.*");
     for ( it = headerList.begin(),found=false; it != headerList.end() && !found; ++it )
@@ -279,7 +278,7 @@ void updateHeader(QString& header,
         headerList.append(temp);
 
     QString dateTimeString = KDateTime::currentLocalDateTime().toString("%Y-%m-%d %H:%M%z");
-    temp="PO-Revision-Date: "%dateTimeString%"\\n";
+    temp="PO-Revision-Date: " + dateTimeString + "\\n";
     QRegExp poRevDate("^ *PO-Revision-Date:.*");
     for ( it = headerList.begin(),found=false; it != headerList.end() && !found; ++it )
     {
@@ -289,7 +288,7 @@ void updateHeader(QString& header,
     if (Q_UNLIKELY( !found ))
         headerList.append(temp);
 
-    temp="Project-Id-Version: "%CatalogProjectId%"\\n";
+    temp="Project-Id-Version: " + CatalogProjectId + "\\n";
     //temp.replace( "@PACKAGE@", packageName());
     QRegExp projectIdVer("^ *Project-Id-Version:.*");
     for ( it = headerList.begin(),found=false; it != headerList.end() && !found; ++it )
@@ -364,7 +363,7 @@ void updateHeader(QString& header,
 
 
 
-    temp="Language-Team: "%language%" <"%mailingList%'>';
+    temp="Language-Team: " + language + " <" + mailingList + '>';
     temp+="\\n";
     if (Q_LIKELY( found ))
         (*ait) = temp;
@@ -372,7 +371,7 @@ void updateHeader(QString& header,
         headerList.append(temp);
 
     QRegExp langCodeRegExp("^ *Language: *([^ \\\\]*)");
-    temp="Language: "%langCode%"\\n";
+    temp="Language: " + langCode + "\\n";
     for ( it = headerList.begin(),found=false; it != headerList.end() && !found; ++it )
     {
         found=(langCodeRegExp.indexIn(*it)!=-1);
@@ -383,7 +382,7 @@ void updateHeader(QString& header,
     if (Q_UNLIKELY( !found ))
         headerList.append(temp);
 
-    temp="Content-Type: text/plain; charset="%codec->name()%"\\n";
+    temp="Content-Type: text/plain; charset=" + codec->name() + "\\n";
     for ( it = headerList.begin(),found=false; it != headerList.end() && !found; ++it )
     {
         found=it->contains(QRegExp("^ *Content-Type:.*"));
@@ -574,7 +573,7 @@ void updateHeader(QString& header,
 //                        return;
     QStringList foundAuthors;
 
-    temp="# "%authorNameEmail%", "%QDate::currentDate().toString("yyyy")%'.';
+    temp="# " + authorNameEmail + ", " + QDate::currentDate().toString("yyyy") + '.';
 
     // ### TODO: it would be nice if the entry could start with "COPYRIGHT" and have the "(C)" symbol (both not mandatory)
     QRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" );
@@ -652,9 +651,9 @@ void updateHeader(QString& header,
                     //update years
                     const int index = (*ait).lastIndexOf( QRegExp("[\\d]+[\\d\\-, ]*") );
                     if ( index == -1 )
-                        (*ait)+=", "%cy;
+                        (*ait)+=", " + cy;
                     else
-                        ait->insert(index+1, ", "%cy);
+                        ait->insert(index+1, ", " + cy);
                 }
                 else
                     kDebug() << "INTERNAL ERROR: author found but iterator dangling!";
index db45a93..4b9f424 100644 (file)
@@ -31,7 +31,6 @@
 #include <QVector>
 #include <QStringList>
 #include <QStringMatcher>
-#include <QStringBuilder>
 #include <QLinkedList>
 
 #include <kdebug.h>
@@ -387,7 +386,7 @@ static void prepareLists(QString str, QStringList& main, QStringList& space, con
     //i tried that but it failed:
     if (!markup.isEmpty())
         markup+='|';
-    QRegExp rxSplit('('%markup%"\\W+|\\d+)+");
+    QRegExp rxSplit('(' + markup + "\\W+|\\d+)+");
 
     main=str.split(rxSplit,QString::SkipEmptyParts);
     main.prepend("\t");//little hack
@@ -453,9 +452,9 @@ QString userVisibleWordDiff(const QString& str1ForMatching,
 
     if (options&Html)
     {
-        res.replace("{KBABELADD}","<font style=\"background-color:"%Settings::addColor().name()%";color:black\">");
+        res.replace("{KBABELADD}","<font style=\"background-color:" + Settings::addColor().name() + ";color:black\">");
         res.replace("{/KBABELADD}","</font>");
-        res.replace("{KBABELDEL}","<font style=\"background-color:"%Settings::delColor().name()%";color:black\">");
+        res.replace("{KBABELDEL}","<font style=\"background-color:" + Settings::delColor().name() + ";color:black\">");
         res.replace("{/KBABELDEL}","</font>");
         res.replace("\\n","\\n<br>");
     }
index 1e944de..18ce8fc 100644 (file)
@@ -42,7 +42,6 @@
 #include <QtGui/qevent.h>
 #include <QSortFilterProxyModel>
 #include <QStyledItemDelegate>
-#include <QStringBuilder>
 #include <QPainter>
 #include <QTextDocument>
 #include <QHeaderView>
@@ -434,7 +433,7 @@ QVariant FileSearchModel::data(const QModelIndex& item, int role) const
 void FileSearchModel::setReplacePreview(const QRegExp& s, const QString& r)
 {
     m_replaceWhat=s;
-    m_replaceWith="_ST_" % r % "_END_";
+    m_replaceWith="_ST_" + r + "_END_";
     
     emit dataChanged(index(0, Target), index(rowCount()-1, Target));
 }
index 7cb8c47..44adbdf 100644 (file)
@@ -38,7 +38,6 @@
 #include <phase.h>
 
 #include <QLabel>
-class QaView;
 #include <QStringListModel>
 #include <QComboBox>
 #include <QTreeView>
@@ -47,10 +46,14 @@ class QaView;
 namespace ThreadWeaver{class Job;}
 namespace ThreadWeaver{class JobCollection;}
 
+class QaView;
 class FileSearchModel;
 class SearchFileListView;
 class MassReplaceView;
+
+QT_BEGIN_NAMESPACE
 class Ui_FileSearchOptions;
+QT_END_NAMESPACE
 
 /**
  * Global file search/repalce tab
@@ -213,7 +216,9 @@ private:
     QStringListModel* m_model;
 };
 
+QT_BEGIN_NAMESPACE
 class Ui_MassReplaceOptions;
+QT_END_NAMESPACE
 
 class MassReplaceView: public QDockWidget
 {
index bfe85c6..41e5f18 100644 (file)
@@ -376,7 +376,7 @@ bool MergeView::event(QEvent *event)
     if (event->type()==QEvent::ToolTip && m_mergeCatalog)
     {
         QHelpEvent *helpEvent = static_cast<QHelpEvent *>(event);
-        QString text="<b>" % url().prettyUrl() % "</b>\n" % i18nc("@info:tooltip","Different entries: %1\nUnmatched entries: %2",
+        QString text="<b>" + url().prettyUrl() + "</b>\n" + i18nc("@info:tooltip","Different entries: %1\nUnmatched entries: %2",
                 m_mergeCatalog->differentEntries().count(),m_mergeCatalog->unmatchedCount());
         text.replace('\n',"<br />");
         QToolTip::showText(helpEvent->globalPos(),text);
index 2168dc8..6262522 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <QCoreApplication>
 #include <QFileSystemModel>
-#include <QStringBuilder>
 
 #include <threadweaver/ThreadWeaver.h>
 #include <kstandarddirs.h>
@@ -116,7 +115,7 @@ QVariant DBFilesModel::headerData(int section, Qt::Orientation orientation, int
 
 void DBFilesModel::openDB(const QString& name)
 {
-    if (QFileInfo(KStandardDirs::locateLocal("appdata", name % REMOTETM_DATABASE_EXTENSION)).exists())
+    if (QFileInfo(KStandardDirs::locateLocal("appdata", name + REMOTETM_DATABASE_EXTENSION)).exists())
         openDB(name, TM::Remote);
     else
         openDB(name, TM::Local);
index 5bd5a77..6a722ee 100644 (file)
@@ -39,8 +39,6 @@
 #include <QSqlDatabase>
 #include <QSqlQuery>
 #include <QSqlError>
-#include <QStringBuilder>
-
 #include <QRegExp>
 #include <QMap>
 
@@ -192,8 +190,8 @@ static void addToIndex(qlonglong sourceId, QString sourceString,
                 return;//this string is already indexed
 
             query1.prepare("UPDATE words "
-                        "SET "%field%"=? "
-                        "WHERE word='"%words.at(j)%'\'');
+                        "SET "+field+"=? "
+                        "WHERE word='"+words.at(j)+'\'');
 
             if (!arr.isEmpty())
                 arr+=' ';
@@ -245,10 +243,10 @@ static void removeFromIndex(qlonglong mainId, qlonglong sourceId, QString source
 //BEGIN check
     //TM_NOTAPPROVED=4
     if (Q_UNLIKELY(!query1.exec("SELECT count(*) FROM main, target_strings WHERE "
-                    "main.source="%QString::number(sourceId)%" AND "
+                    "main.source="+QString::number(sourceId)+" AND "
                     "main.target=target_strings.id AND "
                     "target_strings.target NOTNULL AND "
-                    "main.id!="%QString::number(mainId)%" AND "
+                    "main.id!="+QString::number(mainId)+" AND "
                     "(main.bits&4)!=4")))
     {
         kWarning(TM_AREA) <<"select error 500: " <<query1.lastError().text();
@@ -267,7 +265,7 @@ static void removeFromIndex(qlonglong mainId, qlonglong sourceId, QString source
     {
         // remove from record for the word (if we do not have it)
         if (Q_UNLIKELY(!query1.exec("SELECT word, ids_short, ids_long FROM words WHERE "
-                    "word='"%words.at(j)%'\'')))
+                    "word='"+words.at(j)+'\'')))
         {
             kWarning(TM_AREA) <<"select error 3: " <<query1.lastError().text();
             return;
@@ -305,8 +303,8 @@ static void removeFromIndex(qlonglong mainId, qlonglong sourceId, QString source
 
 
         query1.prepare("UPDATE words "
-                        "SET "%field%"=? "
-                        "WHERE word='"%words.at(j)%'\'');
+                        "SET "+field+"=? "
+                        "WHERE word='"+words.at(j)+'\'');
 
         query1.bindValue(0, arr);
 
@@ -512,7 +510,7 @@ static bool doInsertEntry(CatalogString source,
 
         //check if target in TM matches
         if (Q_UNLIKELY(!query1.exec("SELECT target, target_markup, target_accel FROM target_strings WHERE "
-                         "id="%QString::number(targetId))))
+                         "id="+QString::number(targetId))))
         {
             kWarning(TM_AREA)<<"select db target_strings error: " <<query1.lastError().text();
             return false;
@@ -559,7 +557,7 @@ static bool doInsertEntry(CatalogString source,
 
             query1.prepare("UPDATE target_strings "
                            "SET target=?, target_accel=?, target_markup=? "
-                           "WHERE id="%QString::number(targetId));
+                           "WHERE id="+QString::number(targetId));
 
             query1.bindValue(0, target.string.isEmpty()?QVariant():target.string);
             query1.bindValue(1, targetAccelPos!=-1?QVariant(targetAccelPos):QVariant());
@@ -568,7 +566,7 @@ static bool doInsertEntry(CatalogString source,
             if (!ok)
                 kWarning(TM_AREA)<<"target update failed"<<query1.lastError().text();
             else
-                ok=query1.exec("UPDATE main SET change_date=CURRENT_DATE WHERE target="%QString::number(targetId));
+                ok=query1.exec("UPDATE main SET change_date=CURRENT_DATE WHERE target="+QString::number(targetId));
             return ok;
         }
         //else -> there will be new record insertion and main table update below
@@ -633,7 +631,7 @@ static bool doInsertEntry(CatalogString source,
         //kWarning(TM_AREA) <<"YES! UPDATING!";
         query1.prepare("UPDATE main "
                                "SET target=?, bits=?, change_date=CURRENT_DATE "
-                               "WHERE id="%QString::number(mainId));
+                               "WHERE id="+QString::number(mainId));
 
         query1.bindValue(0, targetId);
         query1.bindValue(1, bits);
@@ -963,7 +961,7 @@ void OpenDBJob::run()
         if (m_type==TM::Local)
         {
             QSqlDatabase db=QSqlDatabase::addDatabase("QSQLITE",m_dbName);
-            db.setDatabaseName(KStandardDirs::locateLocal("appdata", m_dbName % TM_DATABASE_EXTENSION));
+            db.setDatabaseName(KStandardDirs::locateLocal("appdata", m_dbName + TM_DATABASE_EXTENSION));
             m_connectionSuccessful=db.open();
             if (Q_UNLIKELY( !m_connectionSuccessful ))
             {
@@ -997,7 +995,7 @@ void OpenDBJob::run()
 
             if (!m_connParams.isFilled())
             {
-                QFile rdb(KStandardDirs::locateLocal("appdata", m_dbName % REMOTETM_DATABASE_EXTENSION));
+                QFile rdb(KStandardDirs::locateLocal("appdata", m_dbName + REMOTETM_DATABASE_EXTENSION));
                 if (!rdb.open(QIODevice::ReadOnly | QIODevice::Text))
                     return;
 
@@ -1193,7 +1191,7 @@ bool SelectJob::doSelect(QSqlDatabase& db,
     QString tmp=c.markup;
     if (!c.markup.isEmpty())
         tmp+='|';
-    QRegExp rxSplit('('%tmp%"\\W+|\\d+)+");
+    QRegExp rxSplit('('+tmp+"\\W+|\\d+)+");
 
     QString sourceClean(m_source.string);
     sourceClean.remove(c.accel);
@@ -1231,7 +1229,7 @@ bool SelectJob::doSelect(QSqlDatabase& db,
 
         //get records containing current word
         QSqlQuery queryFetch("SELECT id, source, source_accel, source_markup FROM source_strings WHERE "
-                             "source_strings.id IN ("%joined%')',db);
+                             "source_strings.id IN ("+joined+')',db);
         TMEntry e;
         while (queryFetch.next())
         {
@@ -1347,9 +1345,9 @@ bool SelectJob::doSelect(QSqlDatabase& db,
 
             QSqlQuery queryRest("SELECT main.id, main.date, main.ctxt, main.bits, "
                                 "target_strings.target, target_strings.target_accel, target_strings.target_markup, "
-                                "files.path, main.change_date " % change_author_str % 
-                                "FROM main JOIN target_strings ON (target_strings.id=main.target) JOIN files ON (files.id=main.file) " % authors_table_str % "WHERE "
-                                "main.source="%QString::number(e.id)%" AND "
+                                "files.path, main.change_date " + change_author_str +
+                                "FROM main JOIN target_strings ON (target_strings.id=main.target) JOIN files ON (files.id=main.file) " + authors_table_str + "WHERE "
+                                "main.source="+QString::number(e.id)+" AND "
                                 "(main.bits&4)!=4 AND "
                                 "target_strings.target NOTNULL"
                                 ,db); //ORDER BY tm_main.id ?
@@ -1643,7 +1641,7 @@ void UpdateJob::run ()
     qlonglong fileId=getFileId(m_filePath,db);
 
     if (m_form!=-1)
-        m_ctxt+=TM_DELIMITER%QString::number(m_form);
+        m_ctxt+=TM_DELIMITER+QString::number(m_form);
 
     QSqlQuery queryBegin("BEGIN",db);
     qlonglong priorId=-1;
index b6b4d5a..b7622aa 100644 (file)
@@ -41,7 +41,6 @@
 
 #include <QTimer>
 #include <QSortFilterProxyModel>
-#include <QStringBuilder>
 #include <kfiledialog.h>
 #include <kdebug.h>
 // #include <kstandarddirs.h>
@@ -197,7 +196,7 @@ void DBPropertiesDialog::accept()
 
     if (connectionBox->isVisible())
     {
-        QFile rdb(KStandardDirs::locateLocal("appdata", name->text() % REMOTETM_DATABASE_EXTENSION));
+        QFile rdb(KStandardDirs::locateLocal("appdata", name->text() + REMOTETM_DATABASE_EXTENSION));
         if (!rdb.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate))
             return;
 
index 1898bde..86ad920 100644 (file)
@@ -40,7 +40,6 @@
 #include <QtGui/qevent.h>
 #include <QSortFilterProxyModel>
 #include <QStyledItemDelegate>
-#include <QStringBuilder>
 #include <QTextDocument>
 #include <QTextCodec>
 #include <QStringListModel>
@@ -102,9 +101,9 @@ void TMDBModel::setFilter(const QString& source, const QString& target,
         escapedSource.replace('%',"\b%");escapedSource.replace('_',"\b_");
         escapedTarget.replace('%',"\b%");escapedTarget.replace('_',"\b_");
         if (!escapedSource.isEmpty())
-            sourceQuery="AND source_strings.source "%invertSourceStr%"LIKE '%"+escapedSource+"%' ESCAPE '\b' ";
+            sourceQuery="AND source_strings.source " + invertSourceStr + "LIKE '%" + escapedSource + "%' ESCAPE '\b' ";
         if (!escapedTarget.isEmpty())
-            targetQuery="AND target_strings.target "%invertTargetStr%"LIKE '%"+escapedTarget+"%' ESCAPE '\b' ";
+            targetQuery="AND target_strings.target " + invertTargetStr + "LIKE '%" + escapedTarget + "%' ESCAPE '\b' ";
     }
     else if (m_queryType==WordOrder)
     {
@@ -121,13 +120,13 @@ void TMDBModel::setFilter(const QString& source, const QString& target,
     else
     {
         if (!escapedSource.isEmpty())
-            sourceQuery="AND source_strings.source "%invertSourceStr%"GLOB '"%escapedSource%"' ";
+            sourceQuery="AND source_strings.source " + invertSourceStr + "GLOB '" + escapedSource + "' ";
         if (!escapedTarget.isEmpty())
-            targetQuery="AND target_strings.target "%invertTargetStr%"GLOB '"%escapedTarget%"' ";
+            targetQuery="AND target_strings.target " + invertTargetStr + "GLOB '" + escapedTarget + "' ";
 
     }
     if (!filemask.isEmpty())
-        fileQuery="AND files.path GLOB '"%escapedFilemask%"' ";
+        fileQuery="AND files.path GLOB '" + escapedFilemask + "' ";
 
     QString fromPart="FROM main JOIN source_strings ON (source_strings.id=main.source) "
                      "JOIN target_strings ON (target_strings.id=main.target), files "
@@ -328,7 +327,7 @@ QVariant TMResultsSortFilterProxyModel::data(const QModelIndex& index, int role)
     {
         int pos=re.indexIn(string);
         if (pos!=-1)
-            return string.replace(pos, re.matchedLength(), "<b>" % re.cap(0) % "</b>");
+            return string.replace(pos, re.matchedLength(), "<b>" + re.cap(0) + "</b>");
     }
 
     //StartLen sl=m_highlightDataForSourceRow.value(source_row).at(index.column());
index ada2c32..a18b809 100644 (file)
 
 #include <QSqlQueryModel>
 #include <QSqlDatabase>
-
-class QaView;
-class Ui_QueryOptions;
-class KLineEdit;
 #include <QComboBox>
 #include <QTreeView>
 #include <QSortFilterProxyModel>
 #include <QCheckBox>
 
-
 namespace ThreadWeaver{class Job;}
 
+class QaView;
+class KLineEdit;
 class TMResultsSortFilterProxyModel;
 
+QT_BEGIN_NAMESPACE
+class Ui_QueryOptions;
+QT_END_NAMESPACE
+
 namespace TM {
 class TMDBModel;
 
index 8c35ab0..3d80f82 100644 (file)
@@ -482,9 +482,9 @@ void TMView::slotSuggestionsCame(ThreadWeaver::Job* j)
         //result.replace("&","&amp;");
         //result.replace("<","&lt;");
         //result.replace(">","&gt;");
-        result.replace("{KBABELADD}","<font style=\"background-color:"%Settings::addColor().name()%";color:black\">");
+        result.replace("{KBABELADD}","<font style=\"background-color:"+Settings::addColor().name()+";color:black\">");
         result.replace("{/KBABELADD}","</font>");
-        result.replace("{KBABELDEL}","<font style=\"background-color:"%Settings::delColor().name()%";color:black\">");
+        result.replace("{KBABELDEL}","<font style=\"background-color:"+Settings::delColor().name()+";color:black\">");
         result.replace("{/KBABELDEL}","</font>");
         result.replace("\\n","\\n<br>");
         result.replace("\\n","\\n<br>");
@@ -666,18 +666,18 @@ CatalogString TM::targetAdapted(const TMEntry& entry, const CatalogString& ref)
     //QString english=entry.english;
 
 
-    QRegExp rxAdd("<font style=\"background-color:[^>]*" % Settings::addColor().name() % "[^>]*\">([^>]*)</font>");
-    QRegExp rxDel("<font style=\"background-color:[^>]*" % Settings::delColor().name() % "[^>]*\">([^>]*)</font>");
+    QRegExp rxAdd("<font style=\"background-color:[^>]*" + Settings::addColor().name() + "[^>]*\">([^>]*)</font>");
+    QRegExp rxDel("<font style=\"background-color:[^>]*" + Settings::delColor().name() + "[^>]*\">([^>]*)</font>");
     //rxAdd.setMinimal(true);
     //rxDel.setMinimal(true);
 
     //first things first
     int pos=0;
     while ((pos=rxDel.indexIn(diff,pos))!=-1)
-        diff.replace(pos,rxDel.matchedLength(),"\tKBABELDEL\t" % rxDel.cap(1) % "\t/KBABELDEL\t");
+        diff.replace(pos,rxDel.matchedLength(),"\tKBABELDEL\t" + rxDel.cap(1) + "\t/KBABELDEL\t");
     pos=0;
     while ((pos=rxAdd.indexIn(diff,pos))!=-1)
-        diff.replace(pos,rxAdd.matchedLength(),"\tKBABELADD\t" % rxAdd.cap(1) % "\t/KBABELADD\t");
+        diff.replace(pos,rxAdd.matchedLength(),"\tKBABELADD\t" + rxAdd.cap(1) + "\t/KBABELADD\t");
 
     diff.replace("&lt;","<");
     diff.replace("&gt;",">");
@@ -752,7 +752,7 @@ CatalogString TM::targetAdapted(const TMEntry& entry, const CatalogString& ref)
 //BEGIN BEGIN HANDLING
     QRegExp rxNonTranslatable;
     if (tryMarkup)
-        rxNonTranslatable.setPattern("^((" % entry.markupExpr % ")|(\\W|\\d)+)+");
+        rxNonTranslatable.setPattern("^((" + entry.markupExpr + ")|(\\W|\\d)+)+");
     else
         rxNonTranslatable.setPattern("^(\\W|\\d)+");
 
@@ -829,7 +829,7 @@ nono
 //END BEGIN HANDLING
 //BEGIN END HANDLING
     if (tryMarkup)
-        rxNonTranslatable.setPattern("(("% entry.markupExpr %")|(\\W|\\d)+)+$");
+        rxNonTranslatable.setPattern("((" + entry.markupExpr + ")|(\\W|\\d)+)+$");
     else
         rxNonTranslatable.setPattern("(\\W|\\d)+$");
 
index f95a00c..0ddeb8b 100644 (file)
@@ -32,7 +32,7 @@
 
 PageAddPrinter::PageAddPrinter(QWidget *parent) :
     GenericPage(parent),
-    ui(new Ui::PageAddPrinter)
+    ui(new Ui_PageAddPrinter)
 {
     ui->setupUi(this);
     setAttribute(Qt::WA_DeleteOnClose);
index 05824a4..9aaf17c 100644 (file)
@@ -23,9 +23,9 @@
 
 #include "GenericPage.h"
 
-namespace Ui {
-    class PageAddPrinter;
-}
+QT_BEGIN_NAMESPACE
+class Ui_PageAddPrinter;
+QT_END_NAMESPACE
 
 class PageAddPrinter : public GenericPage
 {
@@ -48,7 +48,7 @@ private slots:
     void on_nameLE_textChanged(const QString &text);
 
 private:
-    Ui::PageAddPrinter *ui;
+    Ui_PageAddPrinter *ui;
 };
 
 #endif
index d0bdd37..0939713 100644 (file)
@@ -32,7 +32,7 @@
 
 PageChoosePrinters::PageChoosePrinters(const QVariantHash &args, QWidget *parent) :
     GenericPage(parent),
-    ui(new Ui::PageChoosePrinters)
+    ui(new Ui_PageChoosePrinters)
 {
     ui->setupUi(this);
 
index 01aee67..b7efb30 100644 (file)
@@ -23,9 +23,9 @@
 
 #include "GenericPage.h"
 
-namespace Ui {
-    class PageChoosePrinters;
-}
+QT_BEGIN_NAMESPACE
+class Ui_PageChoosePrinters;
+QT_END_NAMESPACE
 
 class PageChoosePrinters : public GenericPage
 {
@@ -39,7 +39,7 @@ public:
     bool canProceed() const;
 
 private:
-    Ui::PageChoosePrinters *ui;
+    Ui_PageChoosePrinters *ui;
 };
 
 #endif
index 9e63181..2659de0 100644 (file)
@@ -33,8 +33,6 @@
 #include <KLocale>
 #include <KMessageBox>
 
-#include <QStringBuilder>
-
 JobModel::JobModel(QObject *parent) :
     QStandardItemModel(parent),
     m_jobRequest(0),
@@ -332,7 +330,7 @@ void JobModel::insertJob(int pos, const KCupsJob &job)
 
     QString pages = QString::number(job.pages());
     if (job.processedPages()) {
-        pages = QString::number(job.processedPages()) % QLatin1Char('/') % QString::number(job.processedPages());
+        pages = QString::number(job.processedPages()) + QLatin1Char('/') + QString::number(job.processedPages());
     }
     if (statusItem->data(RoleJobPages) != pages) {
         statusItem->setData(pages, RoleJobPages);
@@ -368,7 +366,7 @@ void JobModel::updateJob(int pos, const KCupsJob &job)
 
     QString pages = QString::number(job.pages());
     if (job.processedPages()) {
-        pages = QString::number(job.processedPages()) % QLatin1Char('/') % QString::number(job.processedPages());
+        pages = QString::number(job.processedPages()) + QLatin1Char('/') + QString::number(job.processedPages());
     }
     if (item(pos, ColStatus)->data(RoleJobPages) != pages) {
         item(pos, ColStatus)->setData(pages, RoleJobPages);
index 335fc46..a066e96 100644 (file)
@@ -27,7 +27,6 @@
 #include <config.h>
 
 #include <QCoreApplication>
-#include <QStringBuilder>
 #include <QDBusConnection>
 #include <QByteArray>
 
index c13d6c0..ed08de2 100644 (file)
@@ -30,7 +30,7 @@
 class KDE_EXPORT KCupsPrinter
 {
     Q_GADGET
-    Q_ENUMS(Attribute)
+    Q_ENUMS(Status)
 public:
     typedef enum {
         Idle = 3,
@@ -90,5 +90,6 @@ private:
 typedef QList<KCupsPrinter> KCupsPrinters;
 Q_DECLARE_METATYPE(KCupsPrinters)
 Q_DECLARE_METATYPE(KCupsPrinter)
+Q_DECLARE_METATYPE(KCupsPrinter::Status)
 
 #endif // KCUPSPRINTER_H
index 8d8769d..06c5e79 100644 (file)
  ***************************************************************************/
 
 #include "KCupsRequest.h"
-
 #include "KIppRequest.h"
 #include "KCupsJob.h"
 #include "KCupsPrinter.h"
-
 #include <KLocale>
 #include <KDebug>
-#include <QStringBuilder>
 
 #include <cups/adminutil.h>
 #include <cups/ppd.h>
@@ -409,15 +406,15 @@ void KCupsRequest::printTestPage(const QString &printerName, bool isClass)
     if (datadir.isEmpty()) {
         datadir = CUPS_DATADIR;
     }
-    filename = datadir % QLatin1String("/data/testprint");
+    filename = datadir + QLatin1String("/data/testprint");
 
     /*
      * Point to the printer/class...
      */
     if (isClass) {
-        resource = QLatin1String("/classes/") % printerName;
+        resource = QLatin1String("/classes/") + printerName;
     } else {
-        resource = QLatin1String("/printers/") % printerName;
+        resource = QLatin1String("/printers/") + printerName;
     }
 
     KIppRequest request(IPP_PRINT_JOB, resource.toUtf8(), filename);
index 49a22d0..584a3d5 100644 (file)
@@ -21,8 +21,6 @@
 #include "KIppRequest.h"
 #include "KIppRequest_p.h"
 
-#include <QStringBuilder>
-
 #include <KDebug>
 
 KIppRequest::KIppRequest() :
@@ -186,9 +184,9 @@ QString KIppRequest::assembleUrif(const QString &name, bool isClass)
 
     QString destination;
     if (isClass) {
-        destination = QLatin1String("/classes/") % name;
+        destination = QLatin1String("/classes/") + name;
     } else {
-        destination = QLatin1String("/printers/") % name;
+        destination = QLatin1String("/printers/") + name;
     }
 
     httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", cupsUser(), "localhost",
index 4146ee3..0383b8b 100644 (file)
 
 #include "PPDModel.h"
 
-#include <QStringBuilder>
-
 #include <KLocale>
-
 #include <KDebug>
 
 PPDModel::PPDModel(QObject *parent) :
@@ -107,9 +104,9 @@ QStandardItem *PPDModel::createPPDItem(const QVariantHash &ppd, bool recommended
 
     QString text;
     if (recommended) {
-        text = makeAndModel %
-                QLatin1String(" (") %
-                naturalLanguage %
+        text = makeAndModel +
+                QLatin1String(" (") +
+                naturalLanguage +
                 QLatin1Char(')');
     } else {
         // Removes the Make part of the string
@@ -118,9 +115,9 @@ QStandardItem *PPDModel::createPPDItem(const QVariantHash &ppd, bool recommended
         }
 
         // Create the PPD
-        text = makeAndModel.trimmed() %
-                QLatin1String(" (") %
-                naturalLanguage %
+        text = makeAndModel.trimmed() +
+                QLatin1String(" (") +
+                naturalLanguage +
                 QLatin1Char(')');
     }
     ret->setText(text);
index f13831a..201e13d 100644 (file)
@@ -294,45 +294,45 @@ void PrinterModel::updateDest(QStandardItem *destItem, const KCupsPrinter &print
 
     // store the printer state
     KCupsPrinter::Status state = printer.state();
-    if (state != destItem->data(DestState)) {
+    if (state != qvariant_cast<KCupsPrinter::Status>(destItem->data(DestState))) {
         destItem->setData(state, DestState);
     }
     kDebug() << state << printer.name();
 
     // store if the printer is accepting jobs
     bool accepting = printer.isAcceptingJobs();
-    if (accepting != destItem->data(DestIsAcceptingJobs)) {
+    if (accepting != destItem->data(DestIsAcceptingJobs).toBool()) {
         destItem->setData(accepting, DestIsAcceptingJobs);
     }
 
     // store the printer status message
     QString status = destStatus(state, printer.stateMsg(), accepting);
-    if (status != destItem->data(DestStatus)) {
+    if (status != destItem->data(DestStatus).toString()) {
         destItem->setData(status, DestStatus);
     }
 
     bool paused = (state == KCupsPrinter::Stopped || !accepting);
-    if (paused != destItem->data(DestIsPaused)) {
+    if (paused != destItem->data(DestIsPaused).toBool()) {
         destItem->setData(paused, DestIsPaused);
     }
 
     // store if the printer is shared
     bool shared = printer.isShared();
-    if (shared != destItem->data(DestIsShared)) {
+    if (shared != destItem->data(DestIsShared).toBool()) {
         destItem->setData(shared, DestIsShared);
     }
 
     // store if the printer is a class
     // the printer-type param is a flag
     bool isClass = printer.isClass();
-    if (isClass != destItem->data(DestIsClass)) {
+    if (isClass != destItem->data(DestIsClass).toBool()) {
         destItem->setData(isClass, DestIsClass);
     }
 
     // store if the printer type
     // the printer-type param is a flag
     uint printerType = printer.type();
-    if (printerType != destItem->data(DestType)) {
+    if (printerType != destItem->data(DestType).toUInt()) {
         destItem->setData(printerType, DestType);
         destItem->setData(printerType & CUPS_PRINTER_REMOTE, DestRemote);
     }
@@ -363,13 +363,13 @@ void PrinterModel::updateDest(QStandardItem *destItem, const KCupsPrinter &print
 
     // store the printer kind
     QString kind = printer.makeAndModel();
-    if (kind != destItem->data(DestKind)) {
+    if (kind != destItem->data(DestKind).toString()) {
         destItem->setData(kind, DestKind);
     }
 
     // store the printer commands
     QStringList commands = printer.commands();
-    if (commands != destItem->data(DestCommands)) {
+    if (commands != destItem->data(DestCommands).toStringList()) {
         destItem->setData(commands, DestCommands);
     }
 
index 8ee3bfd..35380c2 100644 (file)
@@ -29,7 +29,6 @@
 #include <QStandardItemModel>
 #include <QLineEdit>
 #include <QtGui/qitemselectionmodel.h>
-#include <QStringBuilder>
 
 #include <QtDBus/QDBusMessage>
 #include <QtDBus/QDBusConnection>
@@ -60,7 +59,7 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, DriverMatch &driv
 
 SelectMakeModel::SelectMakeModel(QWidget *parent) :
     QWidget(parent),
-    ui(new Ui::SelectMakeModel),
+    ui(new Ui_SelectMakeModel),
     m_ppdRequest(0),
     m_gotBestDrivers(false),
     m_hasRecommended(false)
index 8714c8c..199b764 100644 (file)
@@ -29,9 +29,9 @@
 #include "KCupsConnection.h"
 #include "PPDModel.h"
 
-namespace Ui {
-    class SelectMakeModel;
-}
+QT_BEGIN_NAMESPACE
+class Ui_SelectMakeModel;
+QT_END_NAMESPACE
 
 class KCupsRequest;
 class KDE_EXPORT SelectMakeModel : public QWidget
@@ -65,7 +65,7 @@ private:
     void selectMakeModelPPD();
     void selectRecommendedPPD();
 
-    Ui::SelectMakeModel *ui;
+    Ui_SelectMakeModel *ui;
     PPDModel *m_sourceModel;
     KCupsRequest *m_ppdRequest;
     ReturnArguments m_ppds;
index c02cdb4..c6c8808 100644 (file)
@@ -47,7 +47,7 @@ K_EXPORT_PLUGIN(PrintKCMFactory("kcm_print", "print-manager"))
 
 PrintKCM::PrintKCM(QWidget *parent, const QVariantList &args) :
     KCModule(PrintKCMFactory::componentData(), parent, args),
-    ui(new Ui::PrintKCM),
+    ui(new Ui_PrintKCM),
     m_lastError(-1), // Force the error to run on the first time
     m_serverRequest(0)
 {
index 08321e7..fbc7437 100644 (file)
 
 #include <KCupsServer.h>
 
-namespace Ui {
-    class PrintKCM;
-}
 class KCupsRequest;
 class PrinterModel;
+
+QT_BEGIN_NAMESPACE
+class Ui_PrintKCM;
+QT_END_NAMESPACE
+
 class PrintKCM : public KCModule
 {
     Q_OBJECT
@@ -55,7 +57,7 @@ private slots:
     void systemPreferencesTriggered();
 
 private:
-    Ui::PrintKCM *ui;
+    Ui_PrintKCM *ui;
     PrinterModel *m_model;
     int m_lastError;
 
index 7ad07a2..2003d42 100644 (file)
@@ -41,7 +41,7 @@ Q_DECLARE_METATYPE(QList<int>)
 
 PrinterDescription::PrinterDescription(QWidget *parent) :
     QWidget(parent),
-    ui(new Ui::PrinterDescription),
+    ui(new Ui_PrinterDescription),
     m_isClass(false),
     m_markerChangeTime(0)
 {
index 568b8af..797d016 100644 (file)
 #include <QToolButton>
 #include <QSortFilterProxyModel>
 
-namespace Ui {
-    class PrinterDescription;
-}
 class PrintQueueModel;
+
+QT_BEGIN_NAMESPACE
+class Ui_PrinterDescription;
+QT_END_NAMESPACE
+
 class PrinterDescription : public QWidget
 {
     Q_OBJECT
@@ -73,7 +75,7 @@ private slots:
     void requestFinished();
 
 private:
-    Ui::PrinterDescription *ui;
+    Ui_PrinterDescription *ui;
     QString m_destName;
     bool m_isClass;
     bool m_isShared;
index b5a217e..0214228 100644 (file)
@@ -32,8 +32,6 @@
 #include <QToolBar>
 #include <QMenu>
 #include <QByteArray>
-#include <QStringBuilder>
-
 #include <QtDBus/QDBusConnection>
 #include <QtDBus/QDBusMessage>
 
@@ -45,7 +43,7 @@
 
 PrintQueueUi::PrintQueueUi(const KCupsPrinter &printer, QWidget *parent) :
     KDialog(parent),
-    ui(new Ui::PrintQueueUi),
+    ui(new Ui_PrintQueueUi),
     m_destName(printer.name()),
     m_preparingMenu(false),
     m_printerPaused(false),
@@ -72,7 +70,7 @@ PrintQueueUi::PrintQueueUi(const KCupsPrinter &printer, QWidget *parent) :
     if (printer.info().isEmpty()) {
         m_title = printer.name();
     } else {
-        m_title = printer.name() % QLatin1String(" - ") % printer.info();
+        m_title = printer.name() + QLatin1String(" - ") + printer.info();
     }
     setWindowTitle(m_title);
     setButtons(0);
@@ -425,7 +423,7 @@ void PrintQueueUi::getAttributesFinished()
     if (printer.info().isEmpty()) {
         m_title = printer.name();
     } else {
-        m_title = printer.name() % QLatin1String(" - ") % printer.info();
+        m_title = printer.name() + QLatin1String(" - ") + printer.info();
     }
 
     // get printer-state
index 335794d..870d4e6 100644 (file)
 #include <QtCore/qabstractitemmodel.h>
 #include <QToolButton>
 
-namespace Ui {
-    class PrintQueueUi;
-}
-
 class KCupsPrinter;
 class JobSortFilterModel;
 class JobModel;
+
+QT_BEGIN_NAMESPACE
+class Ui_PrintQueueUi;
+QT_END_NAMESPACE
+
 class PrintQueueUi : public KDialog
 {
     Q_OBJECT
@@ -74,7 +75,7 @@ private:
     void setState(int state, const QString &message);
     void modifyJob(int action, const QString &destName = QString());
 
-    Ui::PrintQueueUi *ui;
+    Ui_PrintQueueUi *ui;
     QToolButton *m_filterJobs;
     JobSortFilterModel *m_proxyModel;
     JobModel *m_model;
index b28a53a..5a18a3a 100644 (file)
@@ -52,7 +52,7 @@ bool EventRect::operator==(const EventRect& eventRect) const
     if (m_eventType != eventRect.eventType())
         return false;
 
-    return ::operator==(*this, eventRect);
+    return QT_PREPEND_NAMESPACE(operator==(*this, eventRect));
 }
 
 bool EventRect::operator<(const EventRect& eventRect) const