X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a07d63d419469592b2600e668795cea2f9bee403..25751088c33ce507096a3e25ee1eeaa7de38c76b:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index cfde90ada..35f328be5 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -21,11 +21,10 @@ #include "dolphinremoveaction.h" #include -#include #include #include -#include +#include "dolphindebug.h" #include #include #include @@ -35,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -57,10 +55,9 @@ #include #include #include - +#include K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin();) -K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin")) DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args) : KParts::ReadOnlyPart(parent) @@ -141,7 +138,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL connect(lister, &KDirLister::newItems, notifyExt, &DolphinPartListingNotificationExtension::slotNewItems); connect(lister, &KDirLister::itemsDeleted, notifyExt, &DolphinPartListingNotificationExtension::slotItemsDeleted); } else { - kWarning() << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported"; + qCWarning(DolphinDebug) << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported"; } createActions(); @@ -343,7 +340,7 @@ void DolphinPart::slotMessage(const QString& msg) void DolphinPart::slotErrorMessage(const QString& msg) { - kDebug() << msg; + qCDebug(DolphinDebug) << msg; emit canceled(msg); //KMessageBox::error(m_view, msg); } @@ -474,7 +471,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos, void DolphinPart::slotDirectoryRedirection(const QUrl &oldUrl, const QUrl &newUrl) { - //kDebug() << oldUrl << newUrl << "currentUrl=" << url(); + qCDebug(DolphinDebug) << oldUrl << newUrl << "currentUrl=" << url(); if (oldUrl.matches(url(), QUrl::StripTrailingSlash /* #207572 */)) { KParts::ReadOnlyPart::setUrl(newUrl); const QString prettyUrl = newUrl.toDisplayString(QUrl::PreferLocalFile); @@ -508,7 +505,7 @@ void DolphinPart::slotUnselectItemsMatchingPattern() void DolphinPart::openSelectionDialog(const QString& title, const QString& text, bool selectItems) { bool okClicked; - QString pattern = KInputDialog::getText(title, text, "*", &okClicked, m_view); + const QString pattern = QInputDialog::getText(m_view, title, text, QLineEdit::Normal, "*", &okClicked); if (okClicked && !pattern.isEmpty()) { QRegExp patternRegExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);