Commit 0dea1438 authored by Laurent Montel's avatar Laurent Montel 😁

Rename method, remove unused function

parent 34635bc9
......@@ -87,11 +87,11 @@ SieveEditorWidget::SieveEditorWidget(bool useMenuBar, QWidget *parent)
QStringList overlays;
overlays << QStringLiteral("list-add");
mUpload = new QAction(QIcon(new KIconEngine(QStringLiteral("get-hot-new-stuff"), KIconLoader::global(), overlays)), i18n("Share..."), this);
connect(mUpload, &QAction::triggered, this, &SieveEditorWidget::slotUploadScripts);
mShareScript = new QAction(QIcon(new KIconEngine(QStringLiteral("get-hot-new-stuff"), KIconLoader::global(), overlays)), i18n("Share..."), this);
connect(mShareScript, &QAction::triggered, this, &SieveEditorWidget::slotShareScript);
//Add action to toolBar
toolbar->addAction(mUpload);
toolbar->addAction(mShareScript);
if (useMenuBar) {
SieveEditorMenuBar *menuBar = new SieveEditorMenuBar;
......@@ -118,7 +118,7 @@ SieveEditorWidget::SieveEditorWidget(bool useMenuBar, QWidget *parent)
connect(this, &SieveEditorWidget::undoAvailable, menuBar, &SieveEditorMenuBar::slotUndoAvailable);
menuBar->fileMenu()->addAction(mSaveAs);
menuBar->fileMenu()->addSeparator();
menuBar->fileMenu()->addAction(mUpload);
menuBar->fileMenu()->addAction(mShareScript);
menuBar->toolsMenu()->addSeparator();
menuBar->toolsMenu()->addAction(mAutoGenerateScript);
menuBar->toolsMenu()->addAction(mCheckSyntax);
......@@ -332,7 +332,7 @@ void SieveEditorWidget::setModified(bool b)
}
}
void SieveEditorWidget::slotUploadScripts()
void SieveEditorWidget::slotShareScript()
{
QTemporaryDir tmp;
QTemporaryFile tmpFile;
......
......@@ -67,7 +67,6 @@ public:
bool hasSelection() const;
void checkSpelling();
void share();
void import();
void lowerCase();
void upperCase();
......@@ -93,7 +92,7 @@ public Q_SLOTS:
void goToLine();
void slotSaveAs();
void slotImport();
void slotUploadScripts();
void slotShareScript();
void slotAutoGenerateScripts();
void slotCheckSyntax();
void comment();
......@@ -129,7 +128,7 @@ private:
QAction *mSwitchMode;
QAction *mAutoGenerateScript;
QAction *mSaveAs;
QAction *mUpload;
QAction *mShareScript;
#if !defined(NDEBUG)
QAction *mGenerateXml;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment