]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/renamedialog.cpp
Fix parentless dialogs
[dolphin.git] / src / renamedialog.cpp
index d4d9e16d1dd35468c79a802dc744068d83ecfe59..4a72fda1612f2036d638b0c99ac2ebbe1bce804e 100644 (file)
@@ -26,8 +26,8 @@
 #include <QtGui/QLabel>
 #include <QtGui/QBoxLayout>
 
-RenameDialog::RenameDialog(const QList<KFileItem>& items) :
-    KDialog(),
+RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) :
+    KDialog(parent),
     m_renameOneItem(false)
 {
     const QSize minSize = minimumSize();
@@ -116,7 +116,7 @@ void RenameDialog::slotButtonClicked(int button)
         if (m_newName.isEmpty()) {
             m_errorString = i18nc("@info:status",
                                   "The new name is empty. A name with at least one character must be entered.");
-        } else if (!m_renameOneItem && m_newName.contains('#') != 1) {
+        } else if (!m_renameOneItem && m_newName.count('#') != 1) {
             m_newName.truncate(0);
             m_errorString = i18nc("@info:status", "The name must contain exactly one # character.");
         }