[rkward/frameworks] /: Convert almost all remaining cases of old signal/slot connection syntax

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Wed Nov 25 20:49:45 UTC 2015


Git commit a4cd2eaf5d24c487965888f937bf12e19fadf455 by Thomas Friedrichsmeier.
Committed on 25/11/2015 at 20:49.
Pushed by tfry into branch 'frameworks'.

Convert almost all remaining cases of old signal/slot connection syntax

M  +1    -1    TODO
M  +9    -4    rkward/dataeditor/twintable.cpp
M  +4    -4    rkward/dataeditor/twintablemember.cpp
M  +1    -1    rkward/dialogs/rkerrordialog.cpp
M  +3    -2    rkward/dialogs/rkloadlibsdialog.cpp
M  +3    -2    rkward/misc/getfilenamewidget.cpp
M  +5    -3    rkward/misc/multistringselector.cpp
M  +4    -4    rkward/misc/rkaccordiontable.cpp
M  +1    -1    rkward/misc/rkjobsequence.cpp
M  +6    -6    rkward/misc/rkobjectlistview.cpp
M  +1    -1    rkward/misc/rkprogresscontrol.cpp
M  +1    -1    rkward/misc/rktableview.cpp
M  +1    -1    rkward/misc/rkxmlguisyncer.cpp
M  +2    -2    rkward/misc/rkxmlguisyncer_p.h
M  +2    -2    rkward/plugin/rkcomponentproperties.cpp
M  +1    -1    rkward/plugin/rkinput.cpp
M  +1    -1    rkward/plugin/rkoptionset.cpp
M  +1    -1    rkward/plugin/rkpreviewbox.cpp
M  +2    -2    rkward/plugin/rkstandardcomponent.cpp
M  +1    -1    rkward/plugin/rkstandardcomponentgui.cpp
M  +2    -2    rkward/plugin/rktabpage.cpp
M  +1    -1    rkward/plugin/rkvalueselector.cpp
M  +2    -2    rkward/rkconsole.cpp
M  +7    -7    rkward/rkward.cpp
M  +3    -3    rkward/robjectviewer.cpp
M  +3    -3    rkward/scriptbackends/rkcomponentscripting.cpp
M  +3    -4    rkward/windows/detachedwindowcontainer.cpp
M  +1    -1    rkward/windows/rkcallstackviewer.cpp
M  +6    -6    rkward/windows/rkcommandeditorwindow.cpp
M  +1    -1    rkward/windows/rkcommandeditorwindow.h
M  +2    -2    rkward/windows/rkcommandlog.cpp
M  +1    -1    rkward/windows/rkfilebrowser.cpp
M  +2    -2    rkward/windows/rkhelpsearchwindow.cpp
M  +2    -2    rkward/windows/rkhtmlwindow.cpp
M  +2    -2    rkward/windows/rktoolwindowbar.cpp
M  +2    -2    rkward/windows/rkwindowcatcher.cpp
M  +3    -3    rkward/windows/rkworkplace.cpp
M  +3    -3    rkward/windows/rkworkplaceview.cpp
M  +9    -9    rkward/windows/robjectbrowser.cpp

http://commits.kde.org/rkward/a4cd2eaf5d24c487965888f937bf12e19fadf455

diff --git a/TODO b/TODO
index f3e49da..4591555 100644
--- a/TODO
+++ b/TODO
@@ -4,10 +4,10 @@ All in all, this TODO list is mostly for internal purposes, and many parts may n
 
 KF5 port:
 Things to do:
-- Convert to new Signal / slot syntax
 - Remove kde4libssupport classes
 - Adjust platform checks
 - Check for usages of i18n ("%1").arg(x), instead of i18n ("%1", x)
+- Device window embedding / remove qwinhost
 Things to test at the end:
 - Everthing concerning loading / saving, from recent files, scripts, workspace, etc.
   - Moved installations, moved workspaces.
diff --git a/rkward/dataeditor/twintable.cpp b/rkward/dataeditor/twintable.cpp
index 495f4de..2d78d98 100644
--- a/rkward/dataeditor/twintable.cpp
+++ b/rkward/dataeditor/twintable.cpp
@@ -68,12 +68,17 @@ TwinTable::TwinTable (QWidget *parent) : RKEditor (parent), RObjectListener (ROb
 	dataview->setTwin (metaview);
 
 	// pressing the columns in the metaview-header should select columns in the dataview
+	// Note that the disconnects are on connections already set up by Qt. Since we don't want to worry about how these were set, we're disconnecting
+	// each in both old and new syntax.
 	disconnect (metaview->horizontalHeader (), SIGNAL (sectionClicked(int)));
-	connect (metaview->horizontalHeader (), SIGNAL (sectionClicked(int)), this, SLOT (metaHeaderClicked(int)));
+	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionClicked, 0, 0);
+	connect (metaview->horizontalHeader (), &QHeaderView::sectionClicked, this, &TwinTable::metaHeaderClicked);
 	disconnect (metaview->horizontalHeader (), SIGNAL (sectionPressed(int)));
-	connect (metaview->horizontalHeader (), SIGNAL (sectionPressed(int)), this, SLOT (metaHeaderPressed(int)));
+	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionPressed, 0, 0);
+	connect (metaview->horizontalHeader (), &QHeaderView::sectionPressed, this, &TwinTable::metaHeaderPressed);
 	disconnect (metaview->horizontalHeader (), SIGNAL (sectionEntered(int)));
-	connect (metaview->horizontalHeader (), SIGNAL (sectionEntered(int)), this, SLOT (metaHeaderEntered(int)));
+	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionEntered, 0, 0);
+	connect (metaview->horizontalHeader (), &QHeaderView::sectionEntered, this, &TwinTable::metaHeaderEntered);
 	meta_header_anchor_section = -1;
 
 	// catch header context menu requests
@@ -188,7 +193,7 @@ void TwinTable::initTable (RKVarEditModel* model, RObject* object) {
 	addNotificationType (RObjectListener::MetaChanged);
 	listenForObject (object);
 	objectMetaChanged (object);
-	connect (model, SIGNAL (hasDuplicates(QStringList)), this, SLOT (containsDuplicates(QStringList)));
+	connect (model, &RKVarEditModel::hasDuplicates, this, &TwinTable::containsDuplicates);
 }
 
 void TwinTable::containsDuplicates (const QStringList& dupes) {
diff --git a/rkward/dataeditor/twintablemember.cpp b/rkward/dataeditor/twintablemember.cpp
index b03955f..1e7c96a 100644
--- a/rkward/dataeditor/twintablemember.cpp
+++ b/rkward/dataeditor/twintablemember.cpp
@@ -36,9 +36,9 @@ TwinTableMember::TwinTableMember (QWidget *parent) : RKTableView (parent){
 	setSelectionMode (QAbstractItemView::ContiguousSelection);
 
 	verticalHeader ()->setContextMenuPolicy (Qt::CustomContextMenu);
-	connect (verticalHeader (), SIGNAL (customContextMenuRequested(QPoint)), this, SLOT (handleContextMenuRequest(QPoint)));
+	connect (verticalHeader (), &QWidget::customContextMenuRequested, this, &TwinTableMember::handleContextMenuRequest);
 	horizontalHeader ()->setContextMenuPolicy (Qt::CustomContextMenu);
-	connect (horizontalHeader (), SIGNAL (customContextMenuRequested(QPoint)), this, SLOT (handleContextMenuRequest(QPoint)));
+	connect (horizontalHeader (), &QWidget::customContextMenuRequested, this, &TwinTableMember::handleContextMenuRequest);
 	setContextMenuPolicy (Qt::CustomContextMenu);
 	connect (this, &TwinTableMember::customContextMenuRequested, this, &TwinTableMember::handleContextMenuRequest);
 
@@ -57,7 +57,7 @@ void TwinTableMember::setRKModel (RKVarEditModelBase* model) {
 	setModel (model);
 
 	// now we should also have a selectionModel() (but not before)
-	connect (selectionModel (), SIGNAL (selectionChanged(QItemSelection,QItemSelection)), this, SLOT (tableSelectionChanged(QItemSelection,QItemSelection)));
+	connect (selectionModel (), &QItemSelectionModel::selectionChanged, this, &TwinTableMember::tableSelectionChanged);
 }
 
 void TwinTableMember::setTwin (TwinTableMember * new_twin) {
@@ -65,7 +65,7 @@ void TwinTableMember::setTwin (TwinTableMember * new_twin) {
 	twin = new_twin;
 
 	// probably we only need this one way (metaview->dataview), but why not be safe, when it's so easy
-	connect (twin->horizontalHeader (), SIGNAL (sectionResized(int,int,int)), this, SLOT (updateColWidth(int,int,int)));
+	connect (twin->horizontalHeader (), &QHeaderView::sectionResized, this, &TwinTableMember::updateColWidth);
 }
 
 void TwinTableMember::tableSelectionChanged (const QItemSelection& selected, const QItemSelection&) {
diff --git a/rkward/dialogs/rkerrordialog.cpp b/rkward/dialogs/rkerrordialog.cpp
index 9d97d38..9ce04f7 100644
--- a/rkward/dialogs/rkerrordialog.cpp
+++ b/rkward/dialogs/rkerrordialog.cpp
@@ -65,7 +65,7 @@ public:
 		label->setWordWrap (true);
 		label->setOpenExternalLinks (true);
 
-		connect (this, SIGNAL (finished()), this, SLOT (deleteLater()));
+		connect (this, &QDialog::finished, this, &RKBugzillaReportDialog::deleteLater);
 	}
 
 	// KF5 TODO: add override keyword
diff --git a/rkward/dialogs/rkloadlibsdialog.cpp b/rkward/dialogs/rkloadlibsdialog.cpp
index 1fe2c9b..df5bc85 100644
--- a/rkward/dialogs/rkloadlibsdialog.cpp
+++ b/rkward/dialogs/rkloadlibsdialog.cpp
@@ -91,10 +91,11 @@ RKLoadLibsDialog::~RKLoadLibsDialog () {
 KPageWidgetItem* RKLoadLibsDialog::addChild (QWidget *child_page, const QString &caption) {
 	RK_TRACE (DIALOGS);
 
+	// TODO: Can't convert these signal/slot connections to new syntax, without creating a common base class for the child pages
 	connect (this, SIGNAL (accepted()), child_page, SLOT (ok()));
 	connect (button (QDialogButtonBox::Apply), SIGNAL (clicked(bool)), child_page, SLOT (apply()));
 	connect (this, SIGNAL(rejected()), child_page, SLOT (cancel()));
-	connect (child_page, SIGNAL (destroyed()), this, SLOT (childDeleted()));
+	connect (child_page, &QObject::destroyed, this, &RKLoadLibsDialog::childDeleted);
 	return addPage (child_page, caption);
 }
 
@@ -930,7 +931,7 @@ void RKRPackageInstallationStatus::initialize (RCommandChain *chain) {
 	_initialized = true;	// will be re-set to false, should the command fail / be cancelled
 
 	RCommand *command = new RCommand (".rk.get.package.intallation.state ()", RCommand::App | RCommand::GetStructuredData);
-	connect (command->notifier (), SIGNAL (commandFinished(RCommand*)), this, SLOT (statusCommandFinished(RCommand*)));
+	connect (command->notifier (), &RCommandNotifier::commandFinished, this, &RKRPackageInstallationStatus::statusCommandFinished);
 	RKProgressControl *control = new RKProgressControl (this, i18n ("<p>Please stand by while searching for installed and available packages.</p><p><strong>Note:</strong> This requires a working internet connection, and may take some time, esp. if one or more repositories are temporarily unavailable.</p>"), i18n ("Searching for packages"), RKProgressControl::CancellableProgress | RKProgressControl::AutoCancelCommands);
 	control->addRCommand (command, true);
 	RKGlobals::rInterface ()->issueCommand (command, chain);
diff --git a/rkward/misc/getfilenamewidget.cpp b/rkward/misc/getfilenamewidget.cpp
index 9672190..9ff790f 100644
--- a/rkward/misc/getfilenamewidget.cpp
+++ b/rkward/misc/getfilenamewidget.cpp
@@ -46,8 +46,9 @@ GetFileNameWidget::GetFileNameWidget (QWidget *parent, FileType mode, bool only_
 #ifdef Q_WS_WIN
 		// TODO: Hang on Windows when trying to select any dir (also in KFileDialog::getExistingDirectory ()). KDE 4.10
 		// this hack works around this, by using QFileDialog::getExistingDirectory ().
-		edit->button ()->disconnect (SIGNAL (clicked()));
-		connect (edit->button (), SIGNAL (clicked()), this, SLOT(hackOverrideDirDialog()));
+		edit->button ()->disconnect (SIGNAL (clicked())); // Use old and new syntax, as we don't know, which way it was connected
+		disconnect (edit->button (), &QPushButton::clicked, 0, 0);
+		connect (edit->button (), &QPushButton::clicked, this, &GetFileNameWidget::hackOverrideDirDialog);
 #endif
 	} else if (mode == ExistingFile) {
 		mode_flags = KFile::File | KFile::ExistingOnly;
diff --git a/rkward/misc/multistringselector.cpp b/rkward/misc/multistringselector.cpp
index 7367d03..2ab39f4 100644
--- a/rkward/misc/multistringselector.cpp
+++ b/rkward/misc/multistringselector.cpp
@@ -138,13 +138,15 @@ void RKMultiStringSelectorV2::setModel (QAbstractItemModel* model, int main_colu
 	if (model == tree_view->model ()) return;
 
 	if (tree_view->selectionModel ()) {
-		disconnect (tree_view->selectionModel (), SIGNAL (currentChanged(QModelIndex,QModelIndex)), this, SLOT (updateButtons()));
+		disconnect (tree_view->selectionModel (), &QItemSelectionModel::currentChanged, this, &RKMultiStringSelectorV2::updateButtons);
 	}
 	if (tree_view->model ()) {
-		disconnect (tree_view->model (), 0, this, SLOT (anyModelDataChange()));
+		// NOTE: Commented version gives compile error. Fortunately, we do not connect the model to any other slots, so the version below is ok.
+		//disconnect (tree_view->model (), 0, this, &RKMultiStringSelectorV2::anyModelDataChange);
+		disconnect (tree_view->model (), 0, this, 0);
 	}
 	tree_view->setModel (model);
-	connect (tree_view->selectionModel (), SIGNAL (currentChanged(QModelIndex,QModelIndex)), this, SLOT (updateButtons()));
+	connect (tree_view->selectionModel (), &QItemSelectionModel::currentChanged, this, &RKMultiStringSelectorV2::updateButtons);
 	connect (model, &QStringListModel::dataChanged, this, &RKMultiStringSelectorV2::anyModelDataChange);
 	connect (model, &QStringListModel::layoutChanged, this, &RKMultiStringSelectorV2::anyModelDataChange);
 	connect (model, &QStringListModel::rowsInserted, this, &RKMultiStringSelectorV2::anyModelDataChange);
diff --git a/rkward/misc/rkaccordiontable.cpp b/rkward/misc/rkaccordiontable.cpp
index 32de748..4f4349a 100644
--- a/rkward/misc/rkaccordiontable.cpp
+++ b/rkward/misc/rkaccordiontable.cpp
@@ -150,10 +150,10 @@ public:
 
 	void setSourceModel (QAbstractItemModel* source_model) override {
 		/* More than these would be needed for a proper proxy of any model, but in our case, we only have to support the RKOptionsetDisplayModel */
-		connect (source_model, SIGNAL (rowsInserted(const QModelIndex&,int,int)), this, SLOT (r_rowsInserted(QModelIndex,int,int)));
-		connect (source_model, SIGNAL (rowsRemoved(const QModelIndex&,int,int)), this, SLOT (r_rowsRemoved(QModelIndex,int,int)));
-		connect (source_model, SIGNAL (dataChanged(QModelIndex,QModelIndex)), this, SLOT (r_dataChanged(QModelIndex,QModelIndex)));
-		connect (source_model, SIGNAL (layoutChanged()), this, SLOT (r_layoutChanged()));
+		connect (source_model, &QAbstractItemModel::rowsInserted, this, &RKAccordionDummyModel::r_rowsInserted);
+		connect (source_model, &QAbstractItemModel::rowsRemoved, this, &RKAccordionDummyModel::r_rowsRemoved);
+		connect (source_model, &QAbstractItemModel::dataChanged, this, &RKAccordionDummyModel::r_dataChanged);
+		connect (source_model, &QAbstractItemModel::layoutChanged, this, &RKAccordionDummyModel::r_layoutChanged);
 		QAbstractProxyModel::setSourceModel (source_model);
 	}
 
diff --git a/rkward/misc/rkjobsequence.cpp b/rkward/misc/rkjobsequence.cpp
index 74de952..a0404c8 100644
--- a/rkward/misc/rkjobsequence.cpp
+++ b/rkward/misc/rkjobsequence.cpp
@@ -30,7 +30,7 @@ void RKJobSequence::addJob (KJob* job) {
 	RK_TRACE (MISC);
 
 	outstanding_jobs.append (job);
-	connect (job, SIGNAL (result(KJob*)), this, SLOT(jobDone(KJob*)));
+	connect (job, &KJob::result, this, &RKJobSequence::jobDone);
 }
 
 bool RKJobSequence::hadError () const {
diff --git a/rkward/misc/rkobjectlistview.cpp b/rkward/misc/rkobjectlistview.cpp
index b23fa65..20ebd1b 100644
--- a/rkward/misc/rkobjectlistview.cpp
+++ b/rkward/misc/rkobjectlistview.cpp
@@ -185,9 +185,9 @@ void RKObjectListView::initialize () {
 	setMinimumHeight (rowHeight (genv) * 5);
 	settingsChanged ();
 
-	connect (RObjectList::getObjectList (), SIGNAL (updateComplete()), this, SLOT (updateComplete()));
-	connect (RObjectList::getObjectList (), SIGNAL (updateStarted()), this, SLOT (updateStarted()));
-	connect (selectionModel (), SIGNAL (selectionChanged(QItemSelection,QItemSelection)), this, SLOT (selectionChanged(QItemSelection,QItemSelection)));
+	connect (RObjectList::getObjectList (), &RObjectList::updateComplete, this, &RKObjectListView::updateComplete);
+	connect (RObjectList::getObjectList (), &RObjectList::updateStarted, this, &RKObjectListView::updateStarted);
+	connect (selectionModel (), &QItemSelectionModel::selectionChanged, this, static_cast<void (RKObjectListView::*)(const QItemSelection&, const QItemSelection&)>(&RKObjectListView::selectionChanged));
 	connect (settings, &RKObjectListViewSettings::settingsChanged, this, &RKObjectListView::settingsChanged);
 
 	updateComplete ();
@@ -242,7 +242,7 @@ RKObjectListViewSettings::RKObjectListViewSettings (bool tool_window, QObject* p
 		else persistent_settings[i] = RKSettingsModuleObjectBrowser::isDefaultForVarselector ((PersistentSettings) i);
 		persistent_settings_actions[i]->setCheckable (true);
 		persistent_settings_actions[i]->setChecked (persistent_settings[i]);
-		connect (persistent_settings_actions[i], SIGNAL (toggled(bool)), this, SLOT(filterSettingsChanged ()));
+		connect (persistent_settings_actions[i], &QAction::toggled, this, &RKObjectListViewSettings::filterSettingsChanged);
 	}
 
 	resetFilters (); // inits defaults
@@ -330,8 +330,8 @@ QWidget* RKObjectListViewSettings::filterWidget (QWidget *parent) {
 	layout->addLayout (bottom_layout);
 	QCheckBox* hidden_objects_box = new QCheckBox (i18n ("Show Hidden Objects"));
 	hidden_objects_box->setChecked (persistent_settings[ShowObjectsHidden]);
-	connect (hidden_objects_box, SIGNAL (clicked(bool)), persistent_settings_actions[ShowObjectsHidden], SLOT (setChecked(bool)));
-	connect (persistent_settings_actions[ShowObjectsHidden], SIGNAL (triggered(bool)), hidden_objects_box, SLOT (setChecked(bool)));
+	connect (hidden_objects_box, &QCheckBox::clicked, persistent_settings_actions[ShowObjectsHidden], &QAction::setChecked);
+	connect (persistent_settings_actions[ShowObjectsHidden], &QAction::triggered, hidden_objects_box, &QCheckBox::setChecked);
 	bottom_layout->addWidget (hidden_objects_box);
 
 	// KF5 TODO: In frameworks, there is a function KIconUtils::kIconAddOverlay(). We could use this to overlay "view-filter" and discard, then use that
diff --git a/rkward/misc/rkprogresscontrol.cpp b/rkward/misc/rkprogresscontrol.cpp
index 60e68f2..cae9b95 100644
--- a/rkward/misc/rkprogresscontrol.cpp
+++ b/rkward/misc/rkprogresscontrol.cpp
@@ -152,7 +152,7 @@ void RKProgressControl::done () {
 	}
 
 	if ((!modal) && autodelete) {
-		if (dialog) disconnect (dialog, SIGNAL (destroyed()), this, SLOT (dialogDestroyed()));		// we're already dead
+		if (dialog) disconnect (dialog, &QObject::destroyed, this, &RKProgressControl::dialogDestroyed);		// we're already dead
 		deleteLater ();
 	}
 }
diff --git a/rkward/misc/rktableview.cpp b/rkward/misc/rktableview.cpp
index 968e758..40a3202 100644
--- a/rkward/misc/rktableview.cpp
+++ b/rkward/misc/rktableview.cpp
@@ -95,7 +95,7 @@ void RKTableView::setRKItemDelegate (RKItemDelegate* delegate) {
 	RK_TRACE (EDITOR);
 
 	setItemDelegate (delegate);
-	connect (delegate, SIGNAL (doCloseEditor(QWidget*,RKItemDelegate::EditorDoneReason)), this, SLOT (editorDone(QWidget*,RKItemDelegate::EditorDoneReason)));
+	connect (delegate, &RKItemDelegate::doCloseEditor, this, &RKTableView::editorDone);
 }
 
 void RKTableView::keyPressEvent (QKeyEvent *e) {
diff --git a/rkward/misc/rkxmlguisyncer.cpp b/rkward/misc/rkxmlguisyncer.cpp
index fa852b4..0bf1100 100644
--- a/rkward/misc/rkxmlguisyncer.cpp
+++ b/rkward/misc/rkxmlguisyncer.cpp
@@ -97,7 +97,7 @@ void RKXMLGUISyncerPrivate::uiRcFileChanged (const QString &path)  {
 		RK_DEBUG (MISC, DL_DEBUG, "reloaded client %p for file %s", client, qPrintable (path));
 		if (client->factory ()) {
 			affected_factories.insert (client->factory ());
-			connect (client->factory (), SIGNAL (destroyed(QObject*)), this, SLOT (guiFactoryDestroyed(QObject*)));
+			connect (client->factory (), &KXMLGUIFactory::destroyed, this, &RKXMLGUISyncerPrivate::guiFactoryDestroyed);
 		}
 
 		// find notifiers listening for this client
diff --git a/rkward/misc/rkxmlguisyncer_p.h b/rkward/misc/rkxmlguisyncer_p.h
index cd459bd..9714f3f 100644
--- a/rkward/misc/rkxmlguisyncer_p.h
+++ b/rkward/misc/rkxmlguisyncer_p.h
@@ -46,9 +46,9 @@ Q_OBJECT
 public:
 	RKXMLGUISyncerPrivate () {
 		file_watcher = KDirWatch::self ();
-		connect (file_watcher, SIGNAL (dirty(const QString&)), this, SLOT (uiRcFileChanged(const QString&)));
+		connect (file_watcher, &KDirWatch::dirty, this, &RKXMLGUISyncerPrivate::uiRcFileChanged);
 	
-		connect (&rebuild_guis_timer, SIGNAL (timeout()), this, SLOT (rebuildGUIs()));
+		connect (&rebuild_guis_timer, &QTimer::timeout, this, &RKXMLGUISyncerPrivate::rebuildGUIs);
 		rebuild_guis_timer.setSingleShot (true);
 	}
 	~RKXMLGUISyncerPrivate () {};
diff --git a/rkward/plugin/rkcomponentproperties.cpp b/rkward/plugin/rkcomponentproperties.cpp
index 386b6a7..098103a 100644
--- a/rkward/plugin/rkcomponentproperties.cpp
+++ b/rkward/plugin/rkcomponentproperties.cpp
@@ -132,7 +132,7 @@ void RKComponentPropertyBase::connectToGovernor (RKComponentPropertyBase *govern
 	RK_TRACE (PLUGIN);
 
 	RK_ASSERT (governor);
-	connect (governor, SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (governorValueChanged(RKComponentPropertyBase*)));
+	connect (governor, &RKComponentPropertyBase::valueChanged, this, &RKComponentPropertyBase::governorValueChanged);
 	governor_modifier = modifier;
 	// no need to reconcile any requirements, as the RKComponentPropertyBase does not have any requirements
 
@@ -1433,7 +1433,7 @@ void RKComponentPropertySwitch::setSources (const QString& _condition_prop, cons
 		if (!_value_props[i].isEmpty ()) p = c_parent->lookupProperty (_value_props[i], &mod, true);	// Don't try to look it up, if it's empty (as it always is for fixed_value, as this would generate a warning.)
 		value_props.append (p);	// NOTE: Even if it is 0. value() takes care of that.
 		value_prop_mods.append (mod);
-		if (p) connect (p, SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (sourcePropertyChanged(RKComponentPropertyBase*)));
+		if (p) connect (p, &RKComponentPropertyBase::valueChanged, this, &RKComponentPropertySwitch::sourcePropertyChanged);
 	}
 }
 
diff --git a/rkward/plugin/rkinput.cpp b/rkward/plugin/rkinput.cpp
index 4865faf..50c1d28 100644
--- a/rkward/plugin/rkinput.cpp
+++ b/rkward/plugin/rkinput.cpp
@@ -43,7 +43,7 @@ RKInput::RKInput (const QDomElement &element, RKComponent *parent_component, QWi
 	connect (text, &RKComponentPropertyBase::valueChanged, this, &RKInput::textChanged);
 
 	setRequired (xml->getBoolAttribute (element, "required", false, DL_INFO));
-	connect (requirednessProperty (), SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (requirednessChanged(RKComponentPropertyBase*)));
+	connect (requirednessProperty (), &RKComponentPropertyBase::valueChanged, this, &RKInput::requirednessChanged);
 
 	// do all the layouting
 	QVBoxLayout *vbox = new QVBoxLayout (this);
diff --git a/rkward/plugin/rkoptionset.cpp b/rkward/plugin/rkoptionset.cpp
index 67010f1..19d6e5f 100644
--- a/rkward/plugin/rkoptionset.cpp
+++ b/rkward/plugin/rkoptionset.cpp
@@ -91,7 +91,7 @@ RKOptionSet::RKOptionSet (const QDomElement &element, RKComponent *parent_compon
 	builder->parseLogic (xml->getChildElement (element, "logic", DL_INFO), *xml, false);
 	builder->makeConnections ();
 	addChild ("contents", contents_container);
-	connect (standardComponent (), SIGNAL (standardInitializationComplete()), this, SLOT (fetchDefaults()));
+	connect (standardComponent (), &RKStandardComponent::standardInitializationComplete, this, &RKOptionSet::fetchDefaults);
 
 	// create columns
 	XMLChildList options = xml->getChildElements (element, "optioncolumn", DL_WARNING);
diff --git a/rkward/plugin/rkpreviewbox.cpp b/rkward/plugin/rkpreviewbox.cpp
index f38c77f..babd145 100644
--- a/rkward/plugin/rkpreviewbox.cpp
+++ b/rkward/plugin/rkpreviewbox.cpp
@@ -180,7 +180,7 @@ void RKPreviewBox::rCommandDone (RCommand *command) {
 		if (dev_num != old_devnum) {
 			disconnect (this, SLOT (previewWindowClosed()));
 			RKCaughtX11Window *window = RKCaughtX11Window::getWindow (dev_num);
-			if (window) connect (window, SIGNAL (destroyed(QObject*)), this, SLOT(previewWindowClosed()));
+			if (window) connect (window, &RKCaughtX11Window::destroyed, this, &RKPreviewBox::previewWindowClosed);
 		}
 	} else if (command->getFlags () == DO_PLOT) {
 		QString warnings = command->warnings () + command->error ();
diff --git a/rkward/plugin/rkstandardcomponent.cpp b/rkward/plugin/rkstandardcomponent.cpp
index b5dcc13..81aaeb9 100644
--- a/rkward/plugin/rkstandardcomponent.cpp
+++ b/rkward/plugin/rkstandardcomponent.cpp
@@ -664,7 +664,7 @@ void RKComponentBuilder::buildElement (const QDomElement &element, XMLHelper &xm
 					swidget->setCaption (dummy);
 // TODO we should use a specialized pushbutton, that changes color if the corresponding component is dissatisfied!
 					QPushButton *button = new QPushButton (dummy, parent_widget);
-					component ()->connect (button, SIGNAL (clicked()), widget, SLOT (showGUI()));
+					component ()->connect (button, &QPushButton::clicked, swidget, &RKStandardComponent::showGUI);
 				} else {
 					widget = handle->invoke (component (), parent_widget);
 				}
@@ -714,7 +714,7 @@ void RKComponentBuilder::parseLogic (const QDomElement &element, XMLHelper &xml,
 			RKComponentPropertyBase *prop = new RKComponentPropertyBase (component (), xml.getBoolAttribute (cel, "required", false, DL_INFO));
 			component ()->addChild (id, prop);
 			prop->setInternal (true);
-			component ()->connect (prop, SIGNAL (valueChanged(RKComponentPropertyBase*)), component (), SLOT (outsideValueChanged(RKComponentPropertyBase*)));
+			component ()->connect (prop, &RKComponentPropertyBase::valueChanged, component (), &RKComponent::outsideValueChanged);
 
 			QString dummy = xml.getStringAttribute (cel, "default", QString (), DL_INFO);
 			if (!dummy.isNull ()) {
diff --git a/rkward/plugin/rkstandardcomponentgui.cpp b/rkward/plugin/rkstandardcomponentgui.cpp
index fb6c749..601cd5e 100644
--- a/rkward/plugin/rkstandardcomponentgui.cpp
+++ b/rkward/plugin/rkstandardcomponentgui.cpp
@@ -51,7 +51,7 @@ RKStandardComponentGUI::RKStandardComponentGUI (RKStandardComponent *component,
 	RKStandardComponentGUI::component = component;
 	RKStandardComponentGUI::code_property = code_property;
 	connect (code_property, &RKComponentPropertyCode::valueChanged, this, &RKStandardComponentGUI::codeChanged);
-	connect (RKWardMainWindow::getMain(), SIGNAL (aboutToQuitRKWard()), this, SLOT (cancel()));
+	connect (RKWardMainWindow::getMain(), &RKWardMainWindow::aboutToQuitRKWard, this, &RKStandardComponentGUI::cancel);
 
 	RKStandardComponentGUI::enslaved = enslaved;
 
diff --git a/rkward/plugin/rktabpage.cpp b/rkward/plugin/rktabpage.cpp
index 5b4ed95..d3b98d5 100644
--- a/rkward/plugin/rktabpage.cpp
+++ b/rkward/plugin/rktabpage.cpp
@@ -44,8 +44,8 @@ RKTabPage::RKTabPage (const QDomElement &element, RKComponent *parent_component,
 	page->setSizePolicy (QSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding));
 
 	inserted = true;
-	connect (visibility_property, SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (visibleEnabledChanged(RKComponentPropertyBase*)));
-	connect (enabledness_property, SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (visibleEnabledChanged(RKComponentPropertyBase*)));
+	connect (visibility_property, &RKComponentPropertyBase::valueChanged, this, &RKTabPage::visibleEnabledChanged);
+	connect (enabledness_property, &RKComponentPropertyBase::valueChanged, this, &RKTabPage::visibleEnabledChanged);
 }
 
 RKTabPage::~RKTabPage () {
diff --git a/rkward/plugin/rkvalueselector.cpp b/rkward/plugin/rkvalueselector.cpp
index 987ec11..7e16c60 100644
--- a/rkward/plugin/rkvalueselector.cpp
+++ b/rkward/plugin/rkvalueselector.cpp
@@ -59,7 +59,7 @@ RKValueSelector::RKValueSelector (const QDomElement &element, RKComponent *paren
 	list_view->setRootIsDecorated (false);
 	model = new QStringListModel (this);
 	list_view->setModel (model);
-	connect (list_view->selectionModel (), SIGNAL (selectionChanged(QItemSelection,QItemSelection)), this, SLOT (listSelectionChanged()));
+	connect (list_view->selectionModel (), &QItemSelectionModel::selectionChanged, this, &RKValueSelector::listSelectionChanged);
 
 	vbox->addWidget (list_view);
 
diff --git a/rkward/rkconsole.cpp b/rkward/rkconsole.cpp
index e45904d..43129ec 100644
--- a/rkward/rkconsole.cpp
+++ b/rkward/rkconsole.cpp
@@ -182,8 +182,8 @@ QAction* RKConsole::addProxyAction (const QString& actionName, const QString& la
 		ret->setChecked (found->isChecked ());
 		// TODO: ideally, we'd also relay enabledness, checked state, etc. That would probably require a separate class,
 		// and is not currently needed for the actions that we copy
-		connect (ret, SIGNAL (triggered(bool)), found, SLOT (trigger()));
-		connect (ret, SIGNAL (toggled(bool)), found, SLOT (toggle()));
+		connect (ret, &QAction::triggered, found, &QAction::trigger);
+		connect (ret, &QAction::toggled, found, &QAction::toggle);
 
 		getPart ()->actionCollection ()->addAction (actionName, ret);
 		return ret;
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index a83b926..301a672 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -132,13 +132,13 @@ RKWardMainWindow::RKWardMainWindow () : KParts::MainWindow ((QWidget *)0, (Qt::W
 	new RKWorkplace (this);
 	RKWorkplace::mainWorkplace ()->initActions (actionCollection (), "left_window", "right_window");
 	setCentralWidget (RKWorkplace::mainWorkplace ());
-	connect (RKWorkplace::mainWorkplace ()->view (), SIGNAL (captionChanged(QString)), this, SLOT (setCaption(QString)));
-	connect (RKWorkplace::mainWorkplace (), SIGNAL (workspaceUrlChanged(QUrl)), this, SLOT (addWorkspaceUrl(QUrl)));
+	connect (RKWorkplace::mainWorkplace ()->view (), &RKWorkplaceView::captionChanged, this, static_cast<void (RKWardMainWindow::*)(const QString&)>(&RKWardMainWindow::setCaption));
+	connect (RKWorkplace::mainWorkplace (), &RKWorkplace::workspaceUrlChanged, this, &RKWardMainWindow::addWorkspaceUrl);
 
 	part_manager = new KParts::PartManager (this);
 	// When the manager says the active part changes,
 	// the builder updates (recreates) the GUI
-	connect (partManager (), SIGNAL (activePartChanged(KParts::Part*)), this, SLOT (partChanged(KParts::Part*)));
+	connect (partManager (), &KParts::PartManager::activePartChanged, this, &RKWardMainWindow::partChanged);
 
 	readOptions();
 	RKGlobals::mtracker = new RKModificationTracker (this);
@@ -270,12 +270,12 @@ void RKWardMainWindow::doPostInit () {
 
 	// up to this point, no "real" save-worthy stuff can be pending in the backend. So mark this point as "clean".
 	RCommand *command = new RCommand (QString (), RCommand::EmptyCommand | RCommand::Sync | RCommand::App);
-	connect (command->notifier (), SIGNAL (commandFinished(RCommand*)), this, SLOT (setWorkspaceUnmodified()));
+	connect (command->notifier (), &RCommandNotifier::commandFinished, this, &RKWardMainWindow::setWorkspaceUnmodified);
 	RKGlobals::rInterface ()->issueCommand (command);
 
 	if (!evaluate_code.isEmpty ()) RKConsole::pipeUserCommand (evaluate_code);
 	RKDBusAPI *dbus = new RKDBusAPI (this);
-	connect (this, SIGNAL(aboutToQuitRKWard()), dbus, SLOT(deleteLater()));	// RKWard sometimes needs to wait for R to quit. We don't want it sticking
+	connect (this, &RKWardMainWindow::aboutToQuitRKWard, dbus, &RKDBusAPI::deleteLater);
 	// around on the bus in this case.
 
 	setCaption (QString ());	// our version of setCaption takes care of creating a correct caption, so we do not need to provide it here
@@ -369,8 +369,8 @@ void RKWardMainWindow::configureCarbonCopy () {
 	dialog->setMainWidget (settings);
 	dialog->setButtons (KDialog::Ok | KDialog::Apply | KDialog::Cancel);
 	dialog->setAttribute (Qt::WA_DeleteOnClose);
-	connect (dialog, SIGNAL (okClicked()), settings, SLOT (applyChanges())); 
-	connect (dialog, SIGNAL (applyClicked()), settings, SLOT (applyChanges())); 
+	connect (dialog, &KDialog::okClicked, settings, &RKCarbonCopySettings::applyChanges);
+	connect (dialog, &KDialog::applyClicked, settings, &RKCarbonCopySettings::applyChanges);
 	dialog->show ();
 }
 
diff --git a/rkward/robjectviewer.cpp b/rkward/robjectviewer.cpp
index c8580b9..6ceee76 100644
--- a/rkward/robjectviewer.cpp
+++ b/rkward/robjectviewer.cpp
@@ -66,7 +66,7 @@ RObjectViewer::RObjectViewer (QWidget *parent, RObject *object, ViewerPage initi
 
 	tabs->setCurrentIndex (initial_page);
 	currentTabChanged (initial_page);
-	connect (tabs, SIGNAL (currentChanged(int)), this, SLOT (currentTabChanged(int)));
+	connect (tabs, &QTabWidget::currentChanged, this, &RObjectViewer::currentTabChanged);
 
 	initDescription (false);
 }
@@ -170,11 +170,11 @@ RObjectViewerWidget::RObjectViewerWidget (QWidget* parent, RObject* object) : QW
 	status_layout->addStretch ();
 
 	update_button = new QPushButton (i18n ("Update"), this);
-	connect (update_button, SIGNAL (clicked()), this, SLOT (update()));
+	connect (update_button, &QPushButton::clicked, this, &RObjectViewerWidget::update);
 	status_layout->addWidget (update_button);
 
 	cancel_button = new QPushButton (i18n ("Cancel"), this);
-	connect (cancel_button, SIGNAL (clicked()), this, SLOT (cancel()));
+	connect (cancel_button, &QPushButton::clicked, this, &RObjectViewerWidget::cancel);
 	status_layout->addWidget (cancel_button);
 
 	area = new QTextEdit (this);
diff --git a/rkward/scriptbackends/rkcomponentscripting.cpp b/rkward/scriptbackends/rkcomponentscripting.cpp
index 07d0904..09997a6 100644
--- a/rkward/scriptbackends/rkcomponentscripting.cpp
+++ b/rkward/scriptbackends/rkcomponentscripting.cpp
@@ -125,9 +125,9 @@ void RKComponentScriptingProxy::addChangeCommand (const QString& changed_id, con
 	if (remainder.isEmpty ()) {
 		component_commands.insert (base, command);
 		if (base->isComponent()) {
-			connect (static_cast<RKComponent*> (base), SIGNAL (componentChanged(RKComponent*)), this, SLOT (componentChanged(RKComponent*)));
+			connect (static_cast<RKComponent*> (base), &RKComponent::componentChanged, this, &RKComponentScriptingProxy::componentChanged);
 		} else {
-			connect (static_cast<RKComponentPropertyBase*> (base), SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (propertyChanged(RKComponentPropertyBase*)));
+			connect (static_cast<RKComponentPropertyBase*> (base), &RKComponentPropertyBase::valueChanged, this, &RKComponentScriptingProxy::propertyChanged);
 		}
 	} else {
 		evaluate (QString ("error ('No such property %1 (failed portion was %2)');\n").arg (changed_id, remainder));
@@ -151,7 +151,7 @@ QVariant RKComponentScriptingProxy::doRCommand (const QString& command, const QS
 
 	OutstandingCommand com;
 	com.command = new RCommand (command, RCommand::PriorityCommand | RCommand::GetStructuredData | RCommand::Plugin);
-	connect (com.command->notifier (), SIGNAL (commandFinished(RCommand*)), this, SLOT (scriptRCommandFinished(RCommand*)));
+	connect (com.command->notifier (), &RCommandNotifier::commandFinished, this, &RKComponentScriptingProxy::scriptRCommandFinished);
 	com.callback = callback;
 	outstanding_commands.append (com);
 
diff --git a/rkward/windows/detachedwindowcontainer.cpp b/rkward/windows/detachedwindowcontainer.cpp
index 258c9b9..3aa8f07 100644
--- a/rkward/windows/detachedwindowcontainer.cpp
+++ b/rkward/windows/detachedwindowcontainer.cpp
@@ -80,8 +80,7 @@ DetachedWindowContainer::DetachedWindowContainer (RKMDIWindow *widget_to_capture
 
 	hideEmptyMenus ();
 	// hide empty menus now, and after any reloads
-	// the signal is available since KDE 4.1.3, but we can tolerate a bit of aesthethic malfunction on earlier versions
-	connect (guiFactory (), SIGNAL(makingChanges(bool)), this, SLOT(hideEmptyMenus(bool)));
+	connect (guiFactory (), &KXMLGUIFactory::makingChanges, this, &DetachedWindowContainer::hideEmptyMenus);
 
 // sanitize toolbars
 	foreach (KToolBar *bar, toolBars ()) {
@@ -93,8 +92,8 @@ DetachedWindowContainer::DetachedWindowContainer (RKMDIWindow *widget_to_capture
 	}
 
 // should self-destruct, when child widget is destroyed
-	connect (widget_to_capture, SIGNAL (destroyed(QObject*)), this, SLOT (viewDestroyed(QObject*)));
-	connect (widget_to_capture, SIGNAL (captionChanged(RKMDIWindow*)), this, SLOT (updateCaption(RKMDIWindow*)));
+	connect (widget_to_capture, &RKMDIWindow::destroyed, this, &DetachedWindowContainer::viewDestroyed);
+	connect (widget_to_capture, &RKMDIWindow::captionChanged, this, &DetachedWindowContainer::updateCaption);
 	setCaption (widget_to_capture->fullCaption ());	// has to come after createGUI!
 }
 
diff --git a/rkward/windows/rkcallstackviewer.cpp b/rkward/windows/rkcallstackviewer.cpp
index 1fd2482..03cc3d3 100644
--- a/rkward/windows/rkcallstackviewer.cpp
+++ b/rkward/windows/rkcallstackviewer.cpp
@@ -48,7 +48,7 @@ RKCallstackViewer::RKCallstackViewer (QWidget *parent, bool tool_window, const c
 	setPart (new RKDummyPart (this, layout_widget));
 	initializeActivationSignals ();
 
-	connect (RKDebugHandler::instance (), SIGNAL (newDebugState()), this, SLOT (newDebugState()));
+	connect (RKDebugHandler::instance (), &RKDebugHandler::newDebugState, this, &RKCallstackViewer::newDebugState);
 }
 
 RKCallstackViewer::~RKCallstackViewer () {
diff --git a/rkward/windows/rkcommandeditorwindow.cpp b/rkward/windows/rkcommandeditorwindow.cpp
index 703319a..1436881 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -114,8 +114,8 @@ RKCommandEditorWindow::RKCommandEditorWindow (QWidget *parent, bool use_r_highli
 	layout->setContentsMargins (0, 0, 0, 0);
 	layout->addWidget(m_view);
 
-	connect (m_doc, SIGNAL (documentUrlChanged(KTextEditor::Document*)), this, SLOT (updateCaption(KTextEditor::Document*)));
-	connect (m_doc, SIGNAL (modifiedChanged(KTextEditor::Document*)), this, SLOT (updateCaption(KTextEditor::Document*)));                // of course most of the time this causes a redundant call to updateCaption. Not if a modification is undone, however.
+	connect (m_doc, &KTextEditor::Document::documentUrlChanged, this, &RKCommandEditorWindow::updateCaption);
+	connect (m_doc, &KTextEditor::Document::modifiedChanged, this, &RKCommandEditorWindow::updateCaption);                // of course most of the time this causes a redundant call to updateCaption. Not if a modification is undone, however.
 	connect (m_doc, &KTextEditor::Document::modifiedChanged, this, &RKCommandEditorWindow::autoSaveHandlerModifiedChanged);
 	connect (m_doc, &KTextEditor::Document::textChanged, this, &RKCommandEditorWindow::autoSaveHandlerTextChanged);
 	connect (m_view, &KTextEditor::View::selectionChanged, this, &RKCommandEditorWindow::selectionChanged);
@@ -214,13 +214,13 @@ void RKCommandEditorWindow::initializeActions (KActionCollection* ac) {
 	actionmenu_run_block = new KActionMenu (i18n ("Run block"), this);
 	actionmenu_run_block->setDelayed (false);	// KDE4: TODO does not work correctly in the tool bar.
 	ac->addAction ("run_block", actionmenu_run_block);
-	connect (actionmenu_run_block->menu(), SIGNAL (aboutToShow()), this, SLOT (clearUnusedBlocks()));
+	connect (actionmenu_run_block->menu(), &QMenu::aboutToShow, this, &RKCommandEditorWindow::clearUnusedBlocks);
 	actionmenu_mark_block = new KActionMenu (i18n ("Mark selection as block"), this);
 	ac->addAction ("mark_block", actionmenu_mark_block);
-	connect (actionmenu_mark_block->menu(), SIGNAL (aboutToShow()), this, SLOT (clearUnusedBlocks()));
+	connect (actionmenu_mark_block->menu(), &QMenu::aboutToShow, this, &RKCommandEditorWindow::clearUnusedBlocks);
 	actionmenu_unmark_block = new KActionMenu (i18n ("Unmark block"), this);
 	ac->addAction ("unmark_block", actionmenu_unmark_block);
-	connect (actionmenu_unmark_block->menu(), SIGNAL (aboutToShow()), this, SLOT (clearUnusedBlocks()));
+	connect (actionmenu_unmark_block->menu(), &QMenu::aboutToShow, this, &RKCommandEditorWindow::clearUnusedBlocks);
 
 	action_setwd_to_script = ac->addAction ("setwd_to_script", this, SLOT (setWDToScript()));
 	action_setwd_to_script->setText (i18n ("CD to script directory"));
@@ -554,7 +554,7 @@ void RKCommandEditorWindow::highlightLine (int linenum) {
 	if (!old_rw) m_doc->setReadWrite (false);
 }
 
-void RKCommandEditorWindow::updateCaption (KTextEditor::Document*) {
+void RKCommandEditorWindow::updateCaption () {
 	RK_TRACE (COMMANDEDITOR);
 	QString name = url ().fileName ();
 	if (name.isEmpty ()) name = url ().toDisplayString ();
diff --git a/rkward/windows/rkcommandeditorwindow.h b/rkward/windows/rkcommandeditorwindow.h
index f9e9eea..a0aeffd 100644
--- a/rkward/windows/rkcommandeditorwindow.h
+++ b/rkward/windows/rkcommandeditorwindow.h
@@ -173,7 +173,7 @@ public:
 	void highlightLine (int linenum);
 public slots:
 /** update Tab caption according to the current url. Display the filename-component of the URL, or - if not available - a more elaborate description of the url. Also appends a "[modified]" if appropriate */
-	void updateCaption (KTextEditor::Document* = 0);
+	void updateCaption ();
 /** called whenever it might be appropriate to show a code completion box. The box is not shown immediately, but only after a timeout (if at all) */
 	void tryCompletionProxy (KTextEditor::Document*);
 /** show a code completion box if appropriate. Use tryCompletionProxy () instead, which will call this function after a timeout */
diff --git a/rkward/windows/rkcommandlog.cpp b/rkward/windows/rkcommandlog.cpp
index 2d77835..b5b309c 100644
--- a/rkward/windows/rkcommandlog.cpp
+++ b/rkward/windows/rkcommandlog.cpp
@@ -64,7 +64,7 @@ RKCommandLog::RKCommandLog (QWidget *parent, bool tool_window, const char *name)
 	initializeActivationSignals ();
 	setFocusPolicy (Qt::ClickFocus);
 
-	connect (RKSettings::tracker (), SIGNAL (settingsChanged(RKSettings::SettingsPage)), this, SLOT (settingsChanged(RKSettings::SettingsPage)));
+	connect (RKSettings::tracker (), &RKSettingsTracker::settingsChanged, this, &RKCommandLog::settingsChanged);
 	settingsChanged (RKSettings::PageWatch);
 }
 
@@ -290,7 +290,7 @@ void RKCommandLogPart::initActions () {
 
 	run_selection = RKStandardActions::runCurrent (log, log, SLOT(runSelection()));
 
-	connect (log->getView (), SIGNAL (popupMenuRequest(QPoint)), this, SLOT (doPopupMenu(QPoint)));
+	connect (log->getView (), &RKCommandLogView::popupMenuRequest, this, &RKCommandLogPart::doPopupMenu);
 }
 
 void RKCommandLogPart::doPopupMenu (const QPoint &pos) {
diff --git a/rkward/windows/rkfilebrowser.cpp b/rkward/windows/rkfilebrowser.cpp
index 2511717..4eed941 100644
--- a/rkward/windows/rkfilebrowser.cpp
+++ b/rkward/windows/rkfilebrowser.cpp
@@ -106,7 +106,7 @@ RKFileBrowserWidget::RKFileBrowserWidget (QWidget *parent) : KVBox (parent) {
 	KConfigGroup config = KSharedConfig::openConfig ()->group ("file browser window");
 	dir->readConfig (config);
 	dir->setView (KFile::Default);
-	connect (RKWardMainWindow::getMain (), SIGNAL (aboutToQuitRKWard()), this, SLOT (saveConfig()));
+	connect (RKWardMainWindow::getMain (), &RKWardMainWindow::aboutToQuitRKWard, this, &RKFileBrowserWidget::saveConfig);
 
 	toolbar->addAction (dir->actionCollection ()->action ("up"));
 	toolbar->addAction (dir->actionCollection ()->action ("back"));
diff --git a/rkward/windows/rkhelpsearchwindow.cpp b/rkward/windows/rkhelpsearchwindow.cpp
index b247695..84151ae 100644
--- a/rkward/windows/rkhelpsearchwindow.cpp
+++ b/rkward/windows/rkhelpsearchwindow.cpp
@@ -83,7 +83,7 @@ RKHelpSearchWindow::RKHelpSearchWindow (QWidget *parent, bool tool_window, const
 	field = new QComboBox (this);
 	field->setEditable (true);
 	field->setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
-	connect (field->lineEdit () , SIGNAL (returnPressed()), this, SLOT (slotFindButtonClicked()));
+	connect (field->lineEdit (), &QLineEdit::returnPressed, this, &RKHelpSearchWindow::slotFindButtonClicked);
 	main_settings_layout->addWidget (field);
 
 	QHBoxLayout* fields_packages_layout = new QHBoxLayout ();
@@ -104,7 +104,7 @@ RKHelpSearchWindow::RKHelpSearchWindow (QWidget *parent, bool tool_window, const
 	packagesList = new QComboBox (this);
 	packagesList->setEditable (false);
 	fields_packages_layout->addWidget (packagesList);
-	connect (RKSessionVars::instance (), SIGNAL (installedPackagesChanged()), this, SLOT (updateInstalledPackages()));
+	connect (RKSessionVars::instance (), &RKSessionVars::installedPackagesChanged, this, &RKHelpSearchWindow::updateInstalledPackages);
 	updateInstalledPackages ();
 
 	QVBoxLayout* checkboxes_layout = new QVBoxLayout ();
diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index 6fa674e..02a5a8e 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -564,7 +564,7 @@ void RKHTMLWindow::flushOutput () {
 	if (res==KMessageBox::Yes) {
 		QFile out_file (current_url.toLocalFile ());
 		RCommand *c = new RCommand ("rk.flush.output (" + RCommand::rQuote (out_file.fileName ()) + ", ask=FALSE)\n", RCommand::App);
-		connect (c->notifier (), SIGNAL (commandFinished(RCommand*)), this, SLOT (refresh()));
+		connect (c->notifier (), &RCommandNotifier::commandFinished, this, &RKHTMLWindow::refresh);
 		RKProgressControl *status = new RKProgressControl (this, i18n ("Flushing output"), i18n ("Flushing output"), RKProgressControl::CancellableNoProgress);
 		status->addRCommand (c, true);
 		status->doNonModal (true);
@@ -643,7 +643,7 @@ void RKHTMLWindowPart::initActions () {
 	actionCollection ()->addAction (KStandardAction::Find, "find", window->findbar, SLOT (activate()));
 	QAction* findAhead = actionCollection ()->addAction ("find_ahead", new QAction (i18n ("Find as you type"), this));
 	findAhead->setShortcut ('/');
-	connect (findAhead, SIGNAL (triggered(bool)), window->findbar, SLOT (activate()));
+	connect (findAhead, &QAction::triggered, window->findbar, &RKFindBar::activate);
 	actionCollection ()->addAction (KStandardAction::FindNext, "find_next", window->findbar, SLOT (forward()));;
 	actionCollection ()->addAction (KStandardAction::FindPrev, "find_previous", window->findbar, SLOT (backward()));;;
 }
diff --git a/rkward/windows/rktoolwindowbar.cpp b/rkward/windows/rktoolwindowbar.cpp
index 8ae04a0..671f3e7 100644
--- a/rkward/windows/rktoolwindowbar.cpp
+++ b/rkward/windows/rktoolwindowbar.cpp
@@ -141,7 +141,7 @@ void RKToolWindowBar::addWidget (RKMDIWindow *window) {
 	window->tool_window_bar = this;
 	widget_to_id.insert (window, id);
 
-	connect (tab (id), SIGNAL (clicked(int)), this, SLOT (tabClicked(int)));
+	connect (tab (id), &KMultiTabBarTab::clicked, this, &RKToolWindowBar::tabClicked);
 	tab (id)->installEventFilter (this);
 
 	if (window->isAttached ()) {
@@ -308,7 +308,7 @@ void RKToolWindowBar::contextMenuEvent (QContextMenuEvent* event) {
 		a->setChecked (rep.window->tool_window_bar == this);
 		a->setData (rep.id);
 	}
-	connect (&menu, SIGNAL (triggered(QAction*)), this, SLOT (addRemoveToolWindow(QAction*)));
+	connect (&menu, &KMenu::triggered, this, &RKToolWindowBar::addRemoveToolWindow);
 	menu.exec (event->globalPos ());
 
 	event->accept ();
diff --git a/rkward/windows/rkwindowcatcher.cpp b/rkward/windows/rkwindowcatcher.cpp
index f1dc87d..05c1a32 100644
--- a/rkward/windows/rkwindowcatcher.cpp
+++ b/rkward/windows/rkwindowcatcher.cpp
@@ -227,8 +227,8 @@ RKCaughtX11Window::RKCaughtX11Window (RKGraphicsDevice* rkward_device, int devic
 	xembed_container->setFixedSize (rk_native_device->viewPort ()->size ());
 	resize (xembed_container->size ());
 	rk_native_device->viewPort ()->setParent (xembed_container);
-	connect (rkward_device, SIGNAL (captionChanged(QString)), this, SLOT (setCaption(QString)));
-	connect (rkward_device, SIGNAL (goingInteractive(bool,QString)), this, SLOT (deviceInteractive(bool,QString)));
+	connect (rkward_device, &RKGraphicsDevice::captionChanged, this, &RKCaughtX11Window::setCaption);
+	connect (rkward_device, &RKGraphicsDevice::goingInteractive, this, &RKCaughtX11Window::deviceInteractive);
 	stop_interaction->setVisible (true);
 	stop_interaction->setEnabled (false);
 	setCaption (rkward_device->viewPort ()->windowTitle ());
diff --git a/rkward/windows/rkworkplace.cpp b/rkward/windows/rkworkplace.cpp
index 9b7fc76..517486a 100644
--- a/rkward/windows/rkworkplace.cpp
+++ b/rkward/windows/rkworkplace.cpp
@@ -105,7 +105,7 @@ RKWorkplace::RKWorkplace (QWidget *parent) : QWidget (parent) {
 
 	history = new RKMDIWindowHistory (this);
 
-	connect (RKWardMainWindow::getMain (), SIGNAL (aboutToQuitRKWard()), this, SLOT (saveSettings()));
+	connect (RKWardMainWindow::getMain (), &RKWardMainWindow::aboutToQuitRKWard, this, &RKWorkplace::saveSettings);
 }
 
 RKWorkplace::~RKWorkplace () {
@@ -218,8 +218,8 @@ void RKWorkplace::addWindow (RKMDIWindow *window, bool attached) {
 	RK_TRACE (APP);
 
 	windows.append (window);
-	connect (window, SIGNAL (destroyed(QObject*)), this, SLOT (removeWindow(QObject*)));
-	connect (window, SIGNAL (windowActivated(RKMDIWindow*)), history, SLOT (windowActivated(RKMDIWindow*)));
+	connect (window, &RKMDIWindow::destroyed, this, &RKWorkplace::removeWindow);
+	connect (window, &RKMDIWindow::windowActivated, history, &RKMDIWindowHistory::windowActivated);
 	if (window->isToolWindow () && !window->tool_window_bar) return;
 	if (attached) attachWindow (window);
 	else detachWindow (window, false);
diff --git a/rkward/windows/rkworkplaceview.cpp b/rkward/windows/rkworkplaceview.cpp
index cb275fc..67309bd 100644
--- a/rkward/windows/rkworkplaceview.cpp
+++ b/rkward/windows/rkworkplaceview.cpp
@@ -55,7 +55,7 @@ RKWorkplaceView::RKWorkplaceView (QWidget *parent) : KTabWidget (parent) {
 	setMovable (true);
 
 	tabBar ()->setContextMenuPolicy (Qt::CustomContextMenu);
-	connect (tabBar (), SIGNAL (customContextMenuRequested(QPoint)), this, SLOT (showContextMenu(QPoint)));
+	connect (tabBar (), &QWidget::customContextMenuRequested, this, &RKWorkplaceView::showContextMenu);
 
 	KAcceleratorManager::setNoAccel (tabBar ());	// TODO: This is a WORKAROUND for a bug in kdelibs where tabs named "a0.txt", "a1.txt", etc. will steal the Alt+0/1... shortcuts
 	setTabBarHidden (true);		// initially
@@ -117,7 +117,7 @@ void RKWorkplaceView::addWindow (RKMDIWindow *widget) {
 
 	id = addTab (widget, icon, widget->shortCaption ());
 
-	connect (widget, SIGNAL (captionChanged(RKMDIWindow*)), this, SLOT (childCaptionChanged(RKMDIWindow*)));
+	connect (widget, &RKMDIWindow::captionChanged, this, &RKWorkplaceView::childCaptionChanged);
 	widget->show ();
 
 	if (count () > 1) setTabBarHidden (false);
@@ -134,7 +134,7 @@ void RKWorkplaceView::removeWindow (RKMDIWindow *widget, bool destroyed) {
 
 	int id = indexOf (widget);		// which page is it?
 	if (id == -1) RK_DEBUG (APP, DL_WARNING, "did not find page in RKWorkplaceView::removeWindow");
-	if (!destroyed) disconnect (widget, SIGNAL (captionChanged(RKMDIWindow*)), this, SLOT (childCaptionChanged(RKMDIWindow*)));
+	if (!destroyed) disconnect (widget, &RKMDIWindow::captionChanged, this, &RKWorkplaceView::childCaptionChanged);
 
 	removeTab (id);
 	if (count () <= 1) setTabBarHidden (true);
diff --git a/rkward/windows/robjectbrowser.cpp b/rkward/windows/robjectbrowser.cpp
index 3b51dda..1a58d65 100644
--- a/rkward/windows/robjectbrowser.cpp
+++ b/rkward/windows/robjectbrowser.cpp
@@ -115,23 +115,23 @@ RObjectBrowserInternal::RObjectBrowserInternal (QWidget *parent) : QWidget (pare
 	vbox->addWidget (update_button);
 
 	actions.insert (Help, new QAction (i18n ("Search Help"), this));
-	connect (actions[Help], SIGNAL(triggered(bool)), this, SLOT(popupHelp()));
+	connect (actions[Help], &QAction::triggered, this, &RObjectBrowserInternal::popupHelp);
 	actions.insert (Edit, new QAction (i18n ("Edit"), this));
-	connect (actions[Edit], SIGNAL(triggered(bool)), this, SLOT(popupEdit()));
+	connect (actions[Edit], &QAction::triggered, this, &RObjectBrowserInternal::popupEdit);
 	actions.insert (View, new QAction (i18n ("View"), this));
-	connect (actions[View], SIGNAL(triggered(bool)), this, SLOT(popupView()));
+	connect (actions[View], &QAction::triggered, this, &RObjectBrowserInternal::popupView);
 	actions.insert (Rename, new QAction (i18n ("Rename"), this));
-	connect (actions[Rename], SIGNAL(triggered(bool)), this, SLOT(popupRename()));
+	connect (actions[Rename], &QAction::triggered, this, &RObjectBrowserInternal::popupRename);
 	actions.insert (Copy, new QAction (i18n ("Copy to new symbol"), this));
-	connect (actions[Copy], SIGNAL(triggered(bool)), this, SLOT(popupCopy()));
+	connect (actions[Copy], &QAction::triggered, this, &RObjectBrowserInternal::popupCopy);
 	actions.insert (CopyToGlobalEnv, new QAction (i18n ("Copy to .GlobalEnv"), this));
-	connect (actions[CopyToGlobalEnv], SIGNAL(triggered(bool)), this, SLOT(popupCopyToGlobalEnv()));
+	connect (actions[CopyToGlobalEnv], &QAction::triggered, this, &RObjectBrowserInternal::popupCopyToGlobalEnv);
 	actions.insert (Delete, new QAction (i18n ("Delete"), this));
-	connect (actions[Delete], SIGNAL(triggered(bool)), this, SLOT(popupDelete()));
+	connect (actions[Delete], &QAction::triggered, this, &RObjectBrowserInternal::popupDelete);
 	actions.insert (Unload, new QAction (i18n ("Unload Package"), this));
-	connect (actions[Unload], SIGNAL(triggered(bool)), this, SLOT(popupUnload()));
+	connect (actions[Unload], &QAction::triggered, this, &RObjectBrowserInternal::popupUnload);
 	actions.insert (LoadUnloadPackages, new QAction (i18n ("Load / Unload Packages"), this));
-	connect (actions[LoadUnloadPackages], SIGNAL(triggered(bool)), RKWardMainWindow::getMain(), SLOT(slotFileLoadLibs()));
+	connect (actions[LoadUnloadPackages], &QAction::triggered, RKWardMainWindow::getMain(), &RKWardMainWindow::slotFileLoadLibs);
 
 	QAction* sep = list_view->contextMenu ()->insertSeparator (list_view->contextMenu ()->actions ().value (0));
 	list_view->contextMenu ()->insertActions (sep, actions);



More information about the rkward-tracker mailing list