Gui: replace slots with member function pointers
This commit is contained in:
@@ -1311,16 +1311,16 @@ void PythonConsole::contextMenuEvent ( QContextMenuEvent * e )
|
||||
QAction *a;
|
||||
bool mayPasteHere = cursorBeyond( this->textCursor(), this->inputBegin() );
|
||||
|
||||
a = menu.addAction(tr("&Copy"), this, SLOT(copy()), QKeySequence(QString::fromLatin1("CTRL+C")));
|
||||
a = menu.addAction(tr("&Copy"), this, &PythonConsole::copy, QKeySequence(QString::fromLatin1("CTRL+C")));
|
||||
a->setEnabled(textCursor().hasSelection());
|
||||
|
||||
a = menu.addAction(tr("&Copy command"), this, SLOT(onCopyCommand()));
|
||||
a = menu.addAction(tr("&Copy command"), this, &PythonConsole::onCopyCommand);
|
||||
a->setEnabled(textCursor().hasSelection());
|
||||
|
||||
a = menu.addAction(tr("&Copy history"), this, SLOT(onCopyHistory()));
|
||||
a = menu.addAction(tr("&Copy history"), this, &PythonConsole::onCopyHistory);
|
||||
a->setEnabled(!d->history.isEmpty());
|
||||
|
||||
a = menu.addAction( tr("Save history as..."), this, SLOT(onSaveHistoryAs()));
|
||||
a = menu.addAction( tr("Save history as..."), this, &PythonConsole::onSaveHistoryAs);
|
||||
a->setEnabled(!d->history.isEmpty());
|
||||
|
||||
QAction* saveh = menu.addAction(tr("Save history"));
|
||||
@@ -1330,18 +1330,18 @@ void PythonConsole::contextMenuEvent ( QContextMenuEvent * e )
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
a = menu.addAction(tr("&Paste"), this, SLOT(paste()), QKeySequence(QString::fromLatin1("CTRL+V")));
|
||||
a = menu.addAction(tr("&Paste"), this, &PythonConsole::paste, QKeySequence(QString::fromLatin1("CTRL+V")));
|
||||
const QMimeData *md = QApplication::clipboard()->mimeData();
|
||||
a->setEnabled( mayPasteHere && md && canInsertFromMimeData(md));
|
||||
|
||||
a = menu.addAction(tr("Select All"), this, SLOT(selectAll()), QKeySequence(QString::fromLatin1("CTRL+A")));
|
||||
a = menu.addAction(tr("Select All"), this, &PythonConsole::selectAll, QKeySequence(QString::fromLatin1("CTRL+A")));
|
||||
a->setEnabled(!document()->isEmpty());
|
||||
|
||||
a = menu.addAction(tr("Clear console"), this, SLOT(onClearConsole()));
|
||||
a = menu.addAction(tr("Clear console"), this, &PythonConsole::onClearConsole);
|
||||
a->setEnabled(!document()->isEmpty());
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addAction( tr("Insert file name..."), this, SLOT(onInsertFileName()));
|
||||
menu.addAction( tr("Insert file name..."), this, &PythonConsole::onInsertFileName);
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* wrap = menu.addAction(tr("Word wrap"));
|
||||
|
||||
Reference in New Issue
Block a user