]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.cpp
SVN_SILENT made messages (.desktop file) - always resolve ours
[dolphin.git] / src / dolphinpart.cpp
index bb27e0a5e4650047dd61240f2fee5beca25904b2..a7f0d85cd2e939c7d266699370b1ee7cc0514d17 100644 (file)
@@ -45,6 +45,7 @@
 #include <QTextDocument>
 
 #include <KPluginFactory>
+#include <QAction>
 
 K_PLUGIN_CLASS_WITH_JSON(DolphinPart, "dolphinpart.json")
 
@@ -139,8 +140,9 @@ DolphinPart::~DolphinPart()
 void DolphinPart::createActions()
 {
     // Edit menu
-
-    m_newFileMenu = new DolphinNewFileMenu(actionCollection()->action(QStringLiteral("create_dir")), this);
+    QAction *newDirAction = actionCollection()->action(QStringLiteral("create_dir"));
+    QAction *newFileAction = actionCollection()->action(QStringLiteral("create_file"));
+    m_newFileMenu = new DolphinNewFileMenu(newDirAction, newFileAction, this);
     m_newFileMenu->setParentWidget(widget());
     connect(m_newFileMenu->menu(), &QMenu::aboutToShow, this, &DolphinPart::updateNewMenu);
 
@@ -466,7 +468,7 @@ void DolphinPart::openSelectionDialog(const QString &title, const QString &text,
 
     dialog->setTextValue(QStringLiteral("*"));
 
-    connect(dialog, &QDialog::accepted, this, [=]() {
+    connect(dialog, &QDialog::accepted, this, [=, this]() {
         const QString pattern = dialog->textValue();
         if (!pattern.isEmpty()) {
             QStringList items = dialog->comboBoxItems();