]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/renamedialog.cpp
Clean up includes
[dolphin.git] / src / views / renamedialog.cpp
index 458b9ef79447f9658648ae7338a317f245edc824..f558f3c5fa29a09c6566b9f037193c1e89d9bd04 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "renamedialog.h"
 
-#include <KLineEdit>
 #include <KLocalizedString>
 #include <KJobWidgets>
 #include <KIO/CopyJob>
@@ -35,6 +34,7 @@
 #include <QMimeDatabase>
 #include <QDialogButtonBox>
 #include <QPushButton>
+#include <QLineEdit>
 #include <KGuiItem>
 
 RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) :
@@ -88,9 +88,9 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) :
                                page);
     }
 
-    m_lineEdit = new KLineEdit(page);
+    m_lineEdit = new QLineEdit(page);
     mainLayout->addWidget(m_lineEdit);
-    connect(m_lineEdit, &KLineEdit::textChanged, this, &RenameDialog::slotTextChanged);
+    connect(m_lineEdit, &QLineEdit::textChanged, this, &RenameDialog::slotTextChanged);
 
     int selectionLength = m_newName.length();
     if (m_renameOneItem) {
@@ -131,7 +131,12 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) :
 
         QLabel* infoLabel = new QLabel(i18nc("@info", "# will be replaced by ascending numbers starting with:"), page);
         mainLayout->addWidget(infoLabel);
-        m_spinBox = new KIntSpinBox(0, 10000, 1, 1, page, 10);
+        m_spinBox = new QSpinBox(page);
+        m_spinBox->setMaximum(10000);
+        m_spinBox->setMinimum(0);
+        m_spinBox->setSingleStep(1);
+        m_spinBox->setValue(1);
+        m_spinBox->setDisplayIntegerBase(10);
 
         QHBoxLayout* horizontalLayout = new QHBoxLayout(page);
         horizontalLayout->setMargin(0);
@@ -159,7 +164,7 @@ void RenameDialog::renameItem(const KFileItem &item, const QString& newName)
 
     KIO::Job * job = KIO::moveAs(oldUrl, newUrl);
     KJobWidgets::setWindow(job, widget);
-    KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, QList<QUrl>() << oldUrl, newUrl, job);
+    KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job);
     job->ui()->setAutoErrorHandlingEnabled(true);
 }