From kde-commits Fri Oct 31 22:03:38 2014 From: Montel Laurent Date: Fri, 31 Oct 2014 22:03:38 +0000 To: kde-commits Subject: [kmenuedit] /: port to qDebug* Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=141479302807454 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 =3D 0; _menuEntryInfo =3D 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 +#include #include #include = @@ -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 +#include #include #include = @@ -45,7 +45,7 @@ bool KHotKeys::init() if(!khotkeysInterface->isValid()) { QDBusError err =3D 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& en= try_P ) = QDBusReply reply =3D khotkeysInterface->get_menuentry_shortcu= t(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 #include = -#include +#include #include #include #include @@ -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 " << errorR= ow << ", col " << errorCol << ": " << errorMsg ; + qWarning() << "Parse error in " << m_fileName << ", line " << errorR= ow << ", 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 =3D i18n("Could not write to %1", m_fileName); return false; } @@ -110,7 +110,7 @@ bool MenuFile::save() = if (file.error() !=3D QFile::NoError) { - kWarning() << "Could not close " << m_fileName ; + qWarning() << "Could not close " << m_fileName ; m_error =3D 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 #include #include -#include +#include #include #include #include @@ -462,7 +462,7 @@ TreeItem *TreeView::createTreeItem(TreeItem *parent, QT= reeWidgetItem *after, Men name =3D 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 =3D parentItem ? parentItem->directory() : "/"; MenuFolderInfo *parentFolderInfo =3D parentItem ? parentItem->folderIn= fo() : m_rootFolder; - kDebug() << "think we're dropping on" << (parentItem ? parentItem->tex= t(0) : "Top Level") << index; + //qDebug() << "think we're dropping on" << (parentItem ? parentItem->t= ext(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) << (parentIte= m ? parentItem->text(0) : "Top level"); + ////qDebug() << "an internal drag of" << dragItem->text(0) << (parentI= tem ? parentItem->text(0) : "Top level"); if (dragItem->isDirectory()) { MenuFolderInfo *folderInfo =3D dragItem->folderInfo(); if (action =3D=3D Qt::CopyAction) { @@ -1002,7 +1002,7 @@ bool TreeView::dropMimeData(QTreeWidgetItem *item, in= t 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, in= t 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; }