[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kmenuedit] /: port to qDebug*
From:       Montel Laurent <montel () kde ! org>
Date:       2014-10-31 22:03:38
Message-ID: E1XkKIE-0002Yl-Vl () scm ! kde ! org
[Download RAW message or body]

Git commit f96f43d7eb85883940a6930b83b0b0d5dc785570 by Montel Laurent.
Committed on 31/10/2014 at 22:03.
Pushed by mlaurent into branch 'master'.

port to qDebug*

M  +1    -1    basictab.cpp
M  +2    -2    basictab.h
M  +4    -4    khotkeys.cpp
M  +5    -5    menufile.cpp
M  +6    -6    treeview.cpp

http://commits.kde.org/kmenuedit/f96f43d7eb85883940a6930b83b0b0d5dc785570

diff --git a/basictab.cpp b/basictab.cpp
index 0960c79..67a682e 100644
--- a/basictab.cpp
+++ b/basictab.cpp
@@ -43,7 +43,7 @@
 #include "menuinfo.h"
 
 BasicTab::BasicTab( QWidget *parent )
-    : KTabWidget(parent)
+    : QTabWidget(parent)
 {
     _menuFolderInfo = 0;
     _menuEntryInfo = 0;
diff --git a/basictab.h b/basictab.h
index 3744893..9e2e950 100644
--- a/basictab.h
+++ b/basictab.h
@@ -20,7 +20,7 @@
 #ifndef basictab_h
 #define basictab_h
 
-#include <KTabWidget>
+#include <QTabWidget>
 #include <KShortcut>
 #include <KService>
 
@@ -37,7 +37,7 @@ class KLineSpellChecking;
 class MenuFolderInfo;
 class MenuEntryInfo;
 
-class BasicTab : public KTabWidget
+class BasicTab : public QTabWidget
 {
     Q_OBJECT
 
diff --git a/khotkeys.cpp b/khotkeys.cpp
index d99fcfe..8aba6e0 100644
--- a/khotkeys.cpp
+++ b/khotkeys.cpp
@@ -21,7 +21,7 @@
 #include "khotkeys.h"
 #include "khotkeys_interface.h"
 
-#include <KDebug>
+#include <QDebug>
 #include <KLocalizedString>
 #include <KMessageBox>
 
@@ -45,7 +45,7 @@ bool KHotKeys::init()
     if(!khotkeysInterface->isValid()) {
         QDBusError err = khotkeysInterface->lastError();
         if (err.isValid()) {
-            kError() << err.name() << ":" << err.message();
+            qCritical() << err.name() << ":" << err.message();
         }
         KMessageBox::error(
             NULL,
@@ -83,7 +83,7 @@ QString KHotKeys::getMenuEntryShortcut( const QString& entry_P )
 
     QDBusReply<QString> reply = khotkeysInterface->get_menuentry_shortcut(entry_P);
     if (!reply.isValid()) {
-        kError() << reply.error();
+        qCritical() << reply.error();
         return "";
 
     } else {
@@ -106,7 +106,7 @@ QString KHotKeys::changeMenuEntryShortcut(
             shortcut_P);
 
     if (!reply.isValid()) {
-        kError() << reply.error();
+        qCritical() << reply.error();
         return "";
     } else {
         return reply;
diff --git a/menufile.cpp b/menufile.cpp
index 7efb7a4..a924656 100644
--- a/menufile.cpp
+++ b/menufile.cpp
@@ -23,7 +23,7 @@
 #include <QRegExp>
 #include <QFileInfo>
 
-#include <KDebug>
+#include <QDebug>
 #include <KGlobal>
 #include <KLocalizedString>
 #include <KStandardDirs>
@@ -65,7 +65,7 @@ bool MenuFile::load()
    if (!file.open( QIODevice::ReadOnly ))
    {
        if ( file.exists() )
-           kWarning() << "Could not read " << m_fileName ;
+           qWarning() << "Could not read " << m_fileName ;
        create();
        return false;
    }
@@ -74,7 +74,7 @@ bool MenuFile::load()
    int errorRow;
    int errorCol;
    if ( !m_doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) ) {
-      kWarning() << "Parse error in " << m_fileName << ", line " << errorRow << ", \
col " << errorCol << ": " << errorMsg ; +      qWarning() << "Parse error in " << \
m_fileName << ", line " << errorRow << ", col " << errorCol << ": " << errorMsg ;  \
file.close();  create();
       return false;
@@ -97,7 +97,7 @@ bool MenuFile::save()
 
    if (!file.open( QIODevice::WriteOnly ))
    {
-      kWarning() << "Could not write " << m_fileName ;
+      qWarning() << "Could not write " << m_fileName ;
       m_error = i18n("Could not write to %1", m_fileName);
       return false;
    }
@@ -110,7 +110,7 @@ bool MenuFile::save()
 
    if (file.error() != QFile::NoError)
    {
-      kWarning() << "Could not close " << m_fileName ;
+      qWarning() << "Could not close " << m_fileName ;
       m_error = i18n("Could not write to %1", m_fileName);
       return false;
    }
diff --git a/treeview.cpp b/treeview.cpp
index 979990e..54336de 100644
--- a/treeview.cpp
+++ b/treeview.cpp
@@ -39,7 +39,7 @@
 #include <QAction>
 #include <KActionCollection>
 #include <KBuildSycocaProgressDialog>
-#include <KDebug>
+#include <QDebug>
 #include <KDesktopFile>
 #include <KGlobal>
 #include <KIconLoader>
@@ -462,7 +462,7 @@ TreeItem *TreeView::createTreeItem(TreeItem *parent, \
QTreeWidgetItem *after, Men  name = entryInfo->caption;
     }
 
-    //kDebug() << parent << after << name;
+    ////qDebug() << parent << after << name;
     item->setMenuEntryInfo(entryInfo);
     item->setName(name);
     item->setIcon(0, appIcon(entryInfo->icon));
@@ -909,7 +909,7 @@ bool TreeView::dropMimeData(QTreeWidgetItem *item, int index, \
const QMimeData *d  
     QString folder = parentItem ? parentItem->directory() : "/";
     MenuFolderInfo *parentFolderInfo = parentItem ? parentItem->folderInfo() : \
                m_rootFolder;
-    kDebug() << "think we're dropping on" << (parentItem ? parentItem->text(0) : \
"Top Level") <<  index; +    //qDebug() << "think we're dropping on" << (parentItem ? \
parentItem->text(0) : "Top Level") <<  index;  
     if (!data->hasFormat(s_internalMimeType)) {
         // External drop
@@ -973,7 +973,7 @@ bool TreeView::dropMimeData(QTreeWidgetItem *item, int index, \
const QMimeData *d  return false; // Nothing to do
     }
 
-    //kDebug() << "an internal drag of" << dragItem->text(0) << (parentItem ? \
parentItem->text(0) : "Top level"); +    ////qDebug() << "an internal drag of" << \
dragItem->text(0) << (parentItem ? parentItem->text(0) : "Top level");  if \
(dragItem->isDirectory()) {  MenuFolderInfo *folderInfo = dragItem->folderInfo();
         if (action == Qt::CopyAction) {
@@ -1002,7 +1002,7 @@ bool TreeView::dropMimeData(QTreeWidgetItem *item, int index, \
const QMimeData *d  
             // Add file to menu
             //m_menuFile->moveMenu(oldFolder, folder + newFolder);
-            kDebug() << "moving" << dragItem->text(0) << "to" << folder + newFolder;
+            //qDebug() << "moving" << dragItem->text(0) << "to" << folder + \
                newFolder;
             m_menuFile->pushAction(MenuFile::MOVE_MENU, oldFolder, folder + \
newFolder);  
             // Make sure caption is unique
@@ -1088,7 +1088,7 @@ bool TreeView::dropMimeData(QTreeWidgetItem *item, int index, \
const QMimeData *d  setCurrentItem(newItem);
     }
 
-    kDebug() << "setting the layout to be dirty at" << parentItem;
+    //qDebug() << "setting the layout to be dirty at" << parentItem;
     setLayoutDirty(parentItem);
     return true;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic