[rkward/frameworks] rkward: KTemporaryFile -> QTemporaryFile

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Nov 26 19:57:27 UTC 2015


Git commit 241fba8e9b7e37edf382a1718788420cd5f4d18f by Thomas Friedrichsmeier.
Committed on 26/11/2015 at 19:55.
Pushed by tfry into branch 'frameworks'.

KTemporaryFile -> QTemporaryFile
KIntSpinBox -> QSpinBox
KLineEdit -> QLineEdit (where possible)
KTabWidget -> QTabWidget

M  +1    -1    rkward/misc/getfilenamewidget.cpp
M  +3    -3    rkward/misc/rkdynamicsearchline.cpp
M  +2    -2    rkward/misc/rkdynamicsearchline.h
M  +3    -3    rkward/rbackend/rksessionvars.cpp
M  +4    -3    rkward/rkconsole.cpp
M  +12   -4    rkward/settings/rksettingsmoduleconsole.cpp
M  +3    -3    rkward/settings/rksettingsmoduleconsole.h
M  +12   -4    rkward/settings/rksettingsmodulegraphics.cpp
M  +3    -3    rkward/settings/rksettingsmodulegraphics.h
M  +18   -6    rkward/settings/rksettingsmoduleoutput.cpp
M  +4    -4    rkward/settings/rksettingsmoduleoutput.h
M  +30   -10   rkward/settings/rksettingsmoduler.cpp
M  +6    -6    rkward/settings/rksettingsmoduler.h
M  +6    -2    rkward/settings/rksettingsmodulewatch.cpp
M  +2    -2    rkward/settings/rksettingsmodulewatch.h
M  +2    -3    rkward/windows/rkcommandeditorwindow.cpp
M  +2    -3    rkward/windows/rkhtmlwindow.cpp
M  +2    -2    rkward/windows/rkhtmlwindow.h
M  +1    -1    rkward/windows/rkmdiwindow.cpp
M  +12   -3    rkward/windows/rkwindowcatcher.cpp
M  +4    -14   rkward/windows/rkworkplaceview.cpp
M  +3    -5    rkward/windows/rkworkplaceview.h

http://commits.kde.org/rkward/241fba8e9b7e37edf382a1718788420cd5f4d18f

diff --git a/rkward/misc/getfilenamewidget.cpp b/rkward/misc/getfilenamewidget.cpp
index 83cce92..f0b9e71 100644
--- a/rkward/misc/getfilenamewidget.cpp
+++ b/rkward/misc/getfilenamewidget.cpp
@@ -21,7 +21,7 @@
 #include <QFileDialog>
 
 #include <klocale.h>
-#include <klineedit.h>
+#include <KLineEdit>
 #include <kurlrequester.h>
 
 #include "../debug.h"
diff --git a/rkward/misc/rkdynamicsearchline.cpp b/rkward/misc/rkdynamicsearchline.cpp
index f5fae0e..b193a94 100644
--- a/rkward/misc/rkdynamicsearchline.cpp
+++ b/rkward/misc/rkdynamicsearchline.cpp
@@ -22,12 +22,12 @@
 
 #include "../debug.h"
 
-RKDynamicSearchLine::RKDynamicSearchLine (QWidget *parent) : KLineEdit (parent) {
+RKDynamicSearchLine::RKDynamicSearchLine (QWidget *parent) : QLineEdit (parent) {
 	RK_TRACE (MISC);
 
 	model = 0;
-	setClearButtonShown (true);
-	setClickMessage (i18n ("Search"));
+	setClearButtonEnabled (true);
+	setPlaceholderText (i18n ("Search"));
 	timer.setSingleShot (true);
 	connect (&timer, &QTimer::timeout, this, &RKDynamicSearchLine::delayedSearch);
 	connect (this, &QLineEdit::textChanged, this, &RKDynamicSearchLine::textChanged);
diff --git a/rkward/misc/rkdynamicsearchline.h b/rkward/misc/rkdynamicsearchline.h
index 3f5918c..c269672 100644
--- a/rkward/misc/rkdynamicsearchline.h
+++ b/rkward/misc/rkdynamicsearchline.h
@@ -18,7 +18,7 @@
 #ifndef RKDYNAMICSEARCHLINE_H
 #define RKDYNAMICSEARCHLINE_H
 
-#include <klineedit.h>
+#include <QLineEdit>
 
 #include <QTimer>
 
@@ -26,7 +26,7 @@ class QSortFilterProxyModel;
 
 /** This class is mostly like KFilterProxySearchLine, except allowing us to filter using regexps.
  *  Also some internal differences, due to the fact that we don't have to hide implementation details as in a framework lib. */
-class RKDynamicSearchLine : public KLineEdit {
+class RKDynamicSearchLine : public QLineEdit {
 	Q_OBJECT
 public:
 	RKDynamicSearchLine (QWidget *parent);
diff --git a/rkward/rbackend/rksessionvars.cpp b/rkward/rbackend/rksessionvars.cpp
index 6b1a2c6..d001081 100644
--- a/rkward/rbackend/rksessionvars.cpp
+++ b/rkward/rbackend/rksessionvars.cpp
@@ -23,8 +23,8 @@
 #include "../version.h"
 
 #include <kdeversion.h>
-#include <ktemporaryfile.h>
-#include <kstandarddirs.h>
+#include <QTemporaryFile>
+#include <QStandardPaths>
 
 #include <QSysInfo>
 
@@ -129,7 +129,7 @@ QStringList RKSessionVars::frontendSessionInfo () {
 #elif defined Q_OS_MAC
 	lines.append ("MacOS runtime version (refer to QSysInfo documentation to translate code into human readable form): 0x" + QString::number (QSysInfo::MacintoshVersion, 16));
 #endif
-	lines.append ("Local KDE directory: " + KGlobal::dirs ()->localkdedir ());
+	lines.append ("Local config directory: " + QStandardPaths::writableLocation (QStandardPaths::GenericConfigLocation));
 	lines.append ("RKWard storage directory: " + RKSettingsModuleGeneral::filesPath ());
 	lines.append ("Backend version (as known to the frontend): " + r_version_string);
 	lines.append (QString());
diff --git a/rkward/rkconsole.cpp b/rkward/rkconsole.cpp
index ed81b2e..bf678ba 100644
--- a/rkward/rkconsole.cpp
+++ b/rkward/rkconsole.cpp
@@ -30,9 +30,11 @@
 #include <QVBoxLayout>
 #include <QStandardPaths>
 #include <QFileInfo>
+#include <QTemporaryFile>
+#include <QMimeData>
+#include <QAction>
 
 #include <klocale.h>
-#include <QAction>
 #include <kactioncollection.h>
 #include <kconfig.h>
 #include <kapplication.h>
@@ -45,7 +47,6 @@
 #include <kxmlguifactory.h>
 #include <kfiledialog.h>
 #include <kio/netaccess.h>
-#include <ktemporaryfile.h>
 
 #include "rkglobals.h"
 #include "rkward.h"
@@ -835,7 +836,7 @@ void RKConsole::userSaveHistory (const QUrl &_url) {
 		if (url.isEmpty ()) return;
 	}
 
-	KTemporaryFile tempfile;
+	QTemporaryFile tempfile;
 	tempfile.open ();
 	tempfile.write (QString (commandHistory ().join ("\n") + '\n').toLocal8Bit ().data ());
 	tempfile.close ();
diff --git a/rkward/settings/rksettingsmoduleconsole.cpp b/rkward/settings/rksettingsmoduleconsole.cpp
index c696115..6ed55fb 100644
--- a/rkward/settings/rksettingsmoduleconsole.cpp
+++ b/rkward/settings/rksettingsmoduleconsole.cpp
@@ -53,15 +53,23 @@ RKSettingsModuleConsole::RKSettingsModuleConsole (RKSettings *gui, QWidget *pare
 	vbox->addWidget (save_history_box);
 
 	vbox->addWidget (new QLabel (i18n ("Maximum length of command history"), this));
-	max_history_length_spinner = new KIntSpinBox (0, 10000, 10, max_history_length, this);
+	max_history_length_spinner = new QSpinBox(this);
+	max_history_length_spinner->setMaximum(10000);
+	max_history_length_spinner->setMinimum(0);
+	max_history_length_spinner->setSingleStep(10);
+	max_history_length_spinner->setValue(max_history_length);
 	max_history_length_spinner->setSpecialValueText (i18n ("Unlimited"));
-	connect (max_history_length_spinner, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleConsole::changedSetting);
+	connect (max_history_length_spinner, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleConsole::changedSetting);
 	vbox->addWidget (max_history_length_spinner);
 
 	vbox->addWidget (new QLabel (i18n ("Maximum number of paragraphs/lines to display in the console"), this));
-	max_console_lines_spinner = new KIntSpinBox (0, 10000, 10, max_console_lines, this);
+	max_console_lines_spinner = new QSpinBox(this);
+	max_console_lines_spinner->setMaximum(10000);
+	max_console_lines_spinner->setMinimum(0);
+	max_console_lines_spinner->setSingleStep(10);
+	max_console_lines_spinner->setValue(max_console_lines);
 	max_console_lines_spinner->setSpecialValueText (i18n ("Unlimited"));
-	connect (max_console_lines_spinner, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleConsole::changedSetting);
+	connect (max_console_lines_spinner, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleConsole::changedSetting);
 	vbox->addWidget (max_console_lines_spinner);
 
 	vbox->addSpacing (2*RKGlobals::spacingHint ());
diff --git a/rkward/settings/rksettingsmoduleconsole.h b/rkward/settings/rksettingsmoduleconsole.h
index f5c5482..c0d4b23 100644
--- a/rkward/settings/rksettingsmoduleconsole.h
+++ b/rkward/settings/rksettingsmoduleconsole.h
@@ -23,7 +23,7 @@
 
 class QCheckBox;
 class QComboBox;
-class KIntSpinBox;
+class QSpinBox;
 
 /**
 Settings module for the console. Allows you to configure whether to store command history, command history length. Future extensions: color for warnings/errors, etc.
@@ -78,8 +78,8 @@ private:
 	QCheckBox *reverse_context_mode_box;
 	QCheckBox *pipe_user_commands_through_console_box;
 	QComboBox *add_piped_commands_to_history_box;
-	KIntSpinBox *max_history_length_spinner;
-	KIntSpinBox *max_console_lines_spinner;
+	QSpinBox *max_history_length_spinner;
+	QSpinBox *max_console_lines_spinner;
 };
 
 #endif
diff --git a/rkward/settings/rksettingsmodulegraphics.cpp b/rkward/settings/rksettingsmodulegraphics.cpp
index 42477dc..4059b0c 100644
--- a/rkward/settings/rksettingsmodulegraphics.cpp
+++ b/rkward/settings/rksettingsmodulegraphics.cpp
@@ -136,13 +136,21 @@ RKSettingsModuleGraphics::RKSettingsModuleGraphics (RKSettings *gui, QWidget *pa
 	h_layout = new QHBoxLayout ();
 	group_layout->addLayout (h_layout);
 	h_layout->addWidget (new QLabel (i18n ("Maximum number of recorded plots:"), graphics_hist_box));
-	h_layout->addWidget (graphics_hist_max_length_box = new KIntSpinBox (1, 200, 1, graphics_hist_max_length, graphics_hist_box));
+	h_layout->addWidget (graphics_hist_max_length_box = new QSpinBox(graphics_hist_box));
+	graphics_hist_max_length_box->setMaximum(200);
+	graphics_hist_max_length_box->setMinimum(1);
+	graphics_hist_max_length_box->setSingleStep(1);
+	graphics_hist_max_length_box->setValue(graphics_hist_max_length);
 	h_layout = new QHBoxLayout ();
 	group_layout->addLayout (h_layout);
 	h_layout->addWidget (new QLabel (i18n ("Maximum size of a single recorded plot (in KB):"), graphics_hist_box));
-	h_layout->addWidget (graphics_hist_max_plotsize_box = new KIntSpinBox (4, 20000, 4, graphics_hist_max_plotsize, graphics_hist_box));
-	connect (graphics_hist_max_length_box, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleGraphics::boxChanged);
-	connect (graphics_hist_max_plotsize_box, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleGraphics::boxChanged);
+	h_layout->addWidget (graphics_hist_max_plotsize_box = new QSpinBox(graphics_hist_box));
+	graphics_hist_max_plotsize_box->setMaximum(20000);
+	graphics_hist_max_plotsize_box->setMinimum(4);
+	graphics_hist_max_plotsize_box->setSingleStep(4);
+	graphics_hist_max_plotsize_box->setValue(graphics_hist_max_plotsize);
+	connect (graphics_hist_max_length_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleGraphics::boxChanged);
+	connect (graphics_hist_max_plotsize_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleGraphics::boxChanged);
 
 	main_vbox->addWidget (graphics_hist_box);
 
diff --git a/rkward/settings/rksettingsmodulegraphics.h b/rkward/settings/rksettingsmodulegraphics.h
index caeba2c..976e065 100644
--- a/rkward/settings/rksettingsmodulegraphics.h
+++ b/rkward/settings/rksettingsmodulegraphics.h
@@ -24,7 +24,7 @@
 class QLineEdit;
 class QGroupBox;
 class RKSpinBox;
-class KIntSpinBox;
+class QSpinBox;
 class QCheckBox;
 class QButtonGroup;
 class QRadioButton;
@@ -75,8 +75,8 @@ private:
 	QButtonGroup *replace_standard_devices_group;
 
 	QGroupBox *graphics_hist_box;
-	KIntSpinBox *graphics_hist_max_length_box;
-	KIntSpinBox *graphics_hist_max_plotsize_box;
+	QSpinBox *graphics_hist_max_length_box;
+	QSpinBox *graphics_hist_max_plotsize_box;
 
 	RKSpinBox *graphics_height_box;
 	RKSpinBox *graphics_width_box;
diff --git a/rkward/settings/rksettingsmoduleoutput.cpp b/rkward/settings/rksettingsmoduleoutput.cpp
index 806544a..5997840 100644
--- a/rkward/settings/rksettingsmoduleoutput.cpp
+++ b/rkward/settings/rksettingsmoduleoutput.cpp
@@ -179,21 +179,33 @@ RKSettingsModuleOutput::RKSettingsModuleOutput (RKSettings *gui, QWidget *parent
 	connect (graphics_type_box, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &RKSettingsModuleOutput::boxChanged);
 	h_layout->addSpacing (2*RKGlobals::spacingHint ());
 	h_layout->addWidget (new QLabel (i18n ("JPG quality"), group));
-	h_layout->addWidget (graphics_jpg_quality_box = new KIntSpinBox (1, 100, 1, graphics_jpg_quality, group));
+	h_layout->addWidget (graphics_jpg_quality_box = new QSpinBox(group));
+	graphics_jpg_quality_box->setMaximum(100);
+	graphics_jpg_quality_box->setMinimum(1);
+	graphics_jpg_quality_box->setSingleStep(1);
+	graphics_jpg_quality_box->setValue(graphics_jpg_quality);
 	graphics_jpg_quality_box->setEnabled (graphics_type == "\"JPG\"");
-	connect (graphics_jpg_quality_box, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleOutput::boxChanged);
+	connect (graphics_jpg_quality_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleOutput::boxChanged);
 	h_layout->addStretch ();
 
 	h_layout = new QHBoxLayout ();
 	group_layout->addLayout (h_layout);
 	h_layout->addWidget (new QLabel (i18n ("Width:"), group));
-	h_layout->addWidget (graphics_width_box = new KIntSpinBox (1, INT_MAX, 1, graphics_width, group));
+	h_layout->addWidget (graphics_width_box = new QSpinBox(group));
+	graphics_width_box->setMaximum(INT_MAX);
+	graphics_width_box->setMinimum(1);
+	graphics_width_box->setSingleStep(1);
+	graphics_width_box->setValue(graphics_width);
 	h_layout->addSpacing (2*RKGlobals::spacingHint ());
 	h_layout->addWidget (new QLabel (i18n ("Height:"), group));
-	h_layout->addWidget (graphics_height_box = new KIntSpinBox (1, INT_MAX, 1, graphics_height, group));
+	h_layout->addWidget (graphics_height_box = new QSpinBox(group));
+	graphics_height_box->setMaximum(INT_MAX);
+	graphics_height_box->setMinimum(1);
+	graphics_height_box->setSingleStep(1);
+	graphics_height_box->setValue(graphics_height);
 	h_layout->addStretch ();
-	connect (graphics_width_box, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleOutput::boxChanged);
-	connect (graphics_height_box, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleOutput::boxChanged);
+	connect (graphics_width_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleOutput::boxChanged);
+	connect (graphics_height_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleOutput::boxChanged);
 
 	main_vbox->addWidget (group);
 
diff --git a/rkward/settings/rksettingsmoduleoutput.h b/rkward/settings/rksettingsmoduleoutput.h
index 4f765a5..87a80de 100644
--- a/rkward/settings/rksettingsmoduleoutput.h
+++ b/rkward/settings/rksettingsmoduleoutput.h
@@ -24,7 +24,7 @@
 class QCheckBox;
 class QGroupBox;
 class QComboBox;
-class KIntSpinBox;
+class QSpinBox;
 class RCommand;
 
 /**
@@ -95,9 +95,9 @@ private:
 	QCheckBox *auto_show_box;
 	QCheckBox *auto_raise_box;
 	QComboBox *graphics_type_box;
-	KIntSpinBox *graphics_width_box;
-	KIntSpinBox *graphics_height_box;
-	KIntSpinBox *graphics_jpg_quality_box;
+	QSpinBox *graphics_width_box;
+	QSpinBox *graphics_height_box;
+	QSpinBox *graphics_jpg_quality_box;
 	RKCarbonCopySettings *cc_settings;
 
 	static bool auto_show;
diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
index e22ecf4..3bd11d0 100644
--- a/rkward/settings/rksettingsmoduler.cpp
+++ b/rkward/settings/rksettingsmoduler.cpp
@@ -101,20 +101,32 @@ RKSettingsModuleR::RKSettingsModuleR (RKSettings *gui, QWidget *parent) : RKSett
 
 	// options (width)
 	grid->addWidget (new QLabel (i18n ("Output width (characters)"), this), ++row, 0);
-	width_input = new KIntSpinBox (10, 10000, 1, options_width, this);
-	connect (width_input, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
+	width_input = new QSpinBox(this);
+	width_input->setMaximum(10000);
+	width_input->setMinimum(10);
+	width_input->setSingleStep(1);
+	width_input->setValue(options_width);
+	connect (width_input, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
 	grid->addWidget (width_input, row, 1);
 
 	// options (max.print)
 	grid->addWidget (new QLabel (i18n ("Maximum number of elements shown in print"), this), ++row, 0);
-	maxprint_input = new KIntSpinBox (100, INT_MAX, 1, options_maxprint, this);
-	connect (maxprint_input, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
+	maxprint_input = new QSpinBox(this);
+	maxprint_input->setMaximum(INT_MAX);
+	maxprint_input->setMinimum(100);
+	maxprint_input->setSingleStep(1);
+	maxprint_input->setValue(options_maxprint);
+	connect (maxprint_input, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
 	grid->addWidget (maxprint_input, row, 1);
 
 	// options (warnings.length)
 	grid->addWidget (new QLabel (i18n ("Maximum length of warnings/errors to print"), this), ++row, 0);
-	warningslength_input = new KIntSpinBox (100, 8192, 1, options_warningslength, this);
-	connect (warningslength_input, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
+	warningslength_input = new QSpinBox(this);
+	warningslength_input->setMaximum(8192);
+	warningslength_input->setMinimum(100);
+	warningslength_input->setSingleStep(1);
+	warningslength_input->setValue(options_warningslength);
+	connect (warningslength_input, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
 	grid->addWidget (warningslength_input, row, 1);
 
 	// options (keep.source)
@@ -139,14 +151,22 @@ RKSettingsModuleR::RKSettingsModuleR (RKSettings *gui, QWidget *parent) : RKSett
 
 	// options (expressions)
 	grid->addWidget (new QLabel (i18n ("Maximum level of nested expressions"), this), ++row, 0);
-	expressions_input = new KIntSpinBox (25, 500000, 1, options_expressions, this);
-	connect (expressions_input, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
+	expressions_input = new QSpinBox(this);
+	expressions_input->setMaximum(500000);
+	expressions_input->setMinimum(25);
+	expressions_input->setSingleStep(1);
+	expressions_input->setValue(options_expressions);
+	connect (expressions_input, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
 	grid->addWidget (expressions_input, row, 1);
 
 	// options (digits)
 	grid->addWidget (new QLabel (i18n ("Default decimal precision in print ()"), this), ++row, 0);
-	digits_input = new KIntSpinBox (1, 22, 1, options_digits, this);
-	connect (digits_input, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
+	digits_input = new QSpinBox(this);
+	digits_input->setMaximum(22);
+	digits_input->setMinimum(1);
+	digits_input->setSingleStep(1);
+	digits_input->setValue(options_digits);
+	connect (digits_input, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleR::settingChanged);
 	grid->addWidget (digits_input, row, 1);
 
 	// options (check.bounds)
diff --git a/rkward/settings/rksettingsmoduler.h b/rkward/settings/rksettingsmoduler.h
index 54e70cd..bc12483 100644
--- a/rkward/settings/rksettingsmoduler.h
+++ b/rkward/settings/rksettingsmoduler.h
@@ -26,7 +26,7 @@ class QCheckBox;
 class QComboBox;
 class QLineEdit;
 class MultiStringSelector;
-class KIntSpinBox;
+class QSpinBox;
 class QTextEdit;
 
 /**
@@ -59,14 +59,14 @@ public slots:
 	void settingChanged ();
 private:
 	QLineEdit *outdec_input;
-	KIntSpinBox *width_input;
+	QSpinBox *width_input;
 	QComboBox *warn_input;
-	KIntSpinBox *warningslength_input;
-	KIntSpinBox *maxprint_input;
+	QSpinBox *warningslength_input;
+	QSpinBox *maxprint_input;
 	QComboBox *keepsource_input;
 	QComboBox *keepsourcepkgs_input;
-	KIntSpinBox *expressions_input;
-	KIntSpinBox *digits_input;
+	QSpinBox *expressions_input;
+	QSpinBox *digits_input;
 	QComboBox *checkbounds_input;
 	QComboBox *editor_input;
 	QComboBox *pager_input;
diff --git a/rkward/settings/rksettingsmodulewatch.cpp b/rkward/settings/rksettingsmodulewatch.cpp
index 43201f6..6757409 100644
--- a/rkward/settings/rksettingsmodulewatch.cpp
+++ b/rkward/settings/rksettingsmodulewatch.cpp
@@ -149,9 +149,13 @@ RKSettingsModuleWatch::RKSettingsModuleWatch (RKSettings *gui, QWidget *parent)
 	vbox->addSpacing (2*RKGlobals::spacingHint ());
 
 	vbox->addWidget (new QLabel (i18n ("Maximum number of paragraphs/lines to display in the Command Log"), this));
-	max_log_lines_spinner = new KIntSpinBox (0, 10000, 10, max_log_lines, this);
+	max_log_lines_spinner = new QSpinBox(this);
+	max_log_lines_spinner->setMaximum(10000);
+	max_log_lines_spinner->setMinimum(0);
+	max_log_lines_spinner->setSingleStep(10);
+	max_log_lines_spinner->setValue(max_log_lines);
 	max_log_lines_spinner->setSpecialValueText (i18n ("Unlimited"));
-	connect (max_log_lines_spinner, static_cast<void (KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &RKSettingsModuleWatch::changedSetting);
+	connect (max_log_lines_spinner, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &RKSettingsModuleWatch::changedSetting);
 	vbox->addWidget (max_log_lines_spinner);
 
 	vbox->addStretch ();
diff --git a/rkward/settings/rksettingsmodulewatch.h b/rkward/settings/rksettingsmodulewatch.h
index 3d7749f..956c08e 100644
--- a/rkward/settings/rksettingsmodulewatch.h
+++ b/rkward/settings/rksettingsmodulewatch.h
@@ -22,7 +22,7 @@
 class RCommand;
 class QCheckBox;
 class QGridLayout;
-class KIntSpinBox;
+class QSpinBox;
 
 /**
 Settings module for the RInterface-watch. Allows you to configure what kind of commands you would like to see/hide.
@@ -79,7 +79,7 @@ private:
 
 	static uint max_log_lines;
 
-	KIntSpinBox *max_log_lines_spinner;
+	QSpinBox *max_log_lines_spinner;
 };
 
 #endif
diff --git a/rkward/windows/rkcommandeditorwindow.cpp b/rkward/windows/rkcommandeditorwindow.cpp
index 3ec41d9..f28f4c6 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -45,7 +45,7 @@
 #include <klibloader.h>
 #include <kactioncollection.h>
 #include <kactionmenu.h>
-#include <ktemporaryfile.h>
+#include <QTemporaryFile>
 #include <kio/deletejob.h>
 #include <kio/job.h>
 #include <kconfiggroup.h>
@@ -429,8 +429,7 @@ void RKCommandEditorWindow::doAutoSave () {
 	RK_TRACE (COMMANDEDITOR);
 	RK_ASSERT (isModified ());
 
-	KTemporaryFile save;
-	save.setSuffix (RKSettingsModuleCommandEditor::autosaveSuffix ());
+	QTemporaryFile save (QDir::tempPath () + QLatin1String ("/rkward_XXXXXX") + RKSettingsModuleCommandEditor::autosaveSuffix ());
 	RK_ASSERT (save.open ());
 	QTextStream out (&save);
 	out.setCodec ("UTF-8");		// make sure that all characters can be saved, without nagging the user
diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index a16d4a1..eebbca8 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -26,7 +26,7 @@
 #include <kmimetype.h>
 #include <kio/job.h>
 #include <kservice.h>
-#include <ktemporaryfile.h>
+#include <QTemporaryFile>
 #include <kwebview.h>
 #include <kcodecaction.h>
 #include <kglobalsettings.h>
@@ -538,8 +538,7 @@ void RKHTMLWindow::useMode (WindowMode new_mode) {
 
 void RKHTMLWindow::startNewCacheFile () {
 	delete current_cache_file;
-	current_cache_file = new KTemporaryFile ();
-	current_cache_file->setSuffix (".html");
+	current_cache_file = new QTemporaryFile (QDir::tempPath () + QLatin1String ("/rkward_XXXXXX") + QLatin1String (".html"));
 	current_cache_file->open ();
 }
 
diff --git a/rkward/windows/rkhtmlwindow.h b/rkward/windows/rkhtmlwindow.h
index 4487d0b..a00e919 100644
--- a/rkward/windows/rkhtmlwindow.h
+++ b/rkward/windows/rkhtmlwindow.h
@@ -34,7 +34,7 @@ class RKComponentHandle;
 class XMLHelper;
 class RKHTMLWindowPart;
 class KWebView;
-class KTemporaryFile;
+class QTemporaryFile;
 class RKHTMLWindow;
 class RKFindBar;
 
@@ -142,7 +142,7 @@ friend class RKHTMLWindowPart;
 
 	QUrl current_url;
 	void startNewCacheFile ();
-	KTemporaryFile *current_cache_file;
+	QTemporaryFile *current_cache_file;
 
 	WindowMode window_mode;
 	void useMode (WindowMode);
diff --git a/rkward/windows/rkmdiwindow.cpp b/rkward/windows/rkmdiwindow.cpp
index 8eee005..6c7576e 100644
--- a/rkward/windows/rkmdiwindow.cpp
+++ b/rkward/windows/rkmdiwindow.cpp
@@ -125,7 +125,7 @@ void RKMDIWindow::activate (bool with_focus) {
 			topLevelWidget ()->raise ();
 		}
 	} else {
-		if (isAttached ()) RKWorkplace::mainWorkplace ()->view ()->setActivePage (this);
+		if (isAttached ()) RKWorkplace::mainWorkplace ()->view ()->setCurrentWidget (this);
 		else {
 			topLevelWidget ()->show ();
 			topLevelWidget ()->raise ();
diff --git a/rkward/windows/rkwindowcatcher.cpp b/rkward/windows/rkwindowcatcher.cpp
index f35f727..f90c452 100644
--- a/rkward/windows/rkwindowcatcher.cpp
+++ b/rkward/windows/rkwindowcatcher.cpp
@@ -468,11 +468,20 @@ void RKCaughtX11Window::setFixedSizeManual () {
 	dialog->setMainWidget (page);
 
 	new QLabel (i18n ("Width"), page);
-	KIntSpinBox *width = new KIntSpinBox (5, 32767, 1, xembed_container->width (), page, 10);
-	width->setEditFocus (true);
+	QSpinBox *width = new QSpinBox(page);
+	width->setMaximum (32767);
+	width->setMinimum (5);
+	width->setSingleStep (1);
+	width->setValue (xembed_container->width ());
+	width->setFocus ();
+	width->selectAll ();
 
 	new QLabel (i18n ("Height"), page);
-	KIntSpinBox *height = new KIntSpinBox (5, 32767, 1, xembed_container->height (), page, 10);
+	QSpinBox *height = new QSpinBox(page);
+	height->setMaximum (32767);
+	height->setMinimum (5);
+	height->setSingleStep (1);
+	height->setValue (xembed_container->height ());
 
 	dialog->exec ();
 
diff --git a/rkward/windows/rkworkplaceview.cpp b/rkward/windows/rkworkplaceview.cpp
index 455627d..54d6ec0 100644
--- a/rkward/windows/rkworkplaceview.cpp
+++ b/rkward/windows/rkworkplaceview.cpp
@@ -39,7 +39,7 @@
 #include "../debug.h"
 
 
-RKWorkplaceView::RKWorkplaceView (QWidget *parent) : KTabWidget (parent) {
+RKWorkplaceView::RKWorkplaceView (QWidget *parent) : QTabWidget (parent) {
 	RK_TRACE (APP);
 
 	// close button(s)
@@ -58,7 +58,7 @@ RKWorkplaceView::RKWorkplaceView (QWidget *parent) : KTabWidget (parent) {
 	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
+	tabBar ()->hide ();		// initially
 	connect (this, &QTabWidget::currentChanged, this, &RKWorkplaceView::currentPageChanged);
 }
 
@@ -120,7 +120,7 @@ void RKWorkplaceView::addWindow (RKMDIWindow *widget) {
 	connect (widget, &RKMDIWindow::captionChanged, this, &RKWorkplaceView::childCaptionChanged);
 	widget->show ();
 
-	if (count () > 1) setTabBarHidden (false);
+	if (count () > 1) tabBar ()->show ();
 
 	setCurrentIndex (id);		// activate the new tab
 }
@@ -137,17 +137,7 @@ void RKWorkplaceView::removeWindow (RKMDIWindow *widget, bool destroyed) {
 	if (!destroyed) disconnect (widget, &RKMDIWindow::captionChanged, this, &RKWorkplaceView::childCaptionChanged);
 
 	removeTab (id);
-	if (count () <= 1) setTabBarHidden (true);
-}
-
-// KDE4 TODO: we can use setCurrentWidget, instead.
-void RKWorkplaceView::setActivePage (RKMDIWindow *widget) {
-	RK_TRACE (APP);
-
-	int id = indexOf (widget);
-	if (id == -1) RK_DEBUG (APP, DL_WARNING, "did not find page in RKWorkplaceView::setActivePage");
-
-	setCurrentIndex (id);
+	if (count () <= 1) tabBar ()->hide ();
 }
 
 RKMDIWindow *RKWorkplaceView::activePage () {
diff --git a/rkward/windows/rkworkplaceview.h b/rkward/windows/rkworkplaceview.h
index bec220a..457e69c 100644
--- a/rkward/windows/rkworkplaceview.h
+++ b/rkward/windows/rkworkplaceview.h
@@ -18,16 +18,16 @@
 #ifndef RKWORKPLACEVIEW_H
 #define RKWORKPLACEVIEW_H
 
-#include <ktabwidget.h>
+#include <QTabWidget>
 
 class RKMDIWindow;
 class QAction;
 class KActionCollection;
 
-/** This is mostly a KTabWidget with some extras such as updating the caption, a context menu, etc.
+/** This is mostly a QTabWidget with some extras such as updating the caption, a context menu, etc.
  */
 
-class RKWorkplaceView : public KTabWidget {
+class RKWorkplaceView : public QTabWidget {
 	Q_OBJECT
 public:
 /** constructor
@@ -43,8 +43,6 @@ public:
 /** does this window exist in the view? */
 	bool hasWindow (RKMDIWindow *widget);
 
-/** activate the given window */
-	void setActivePage (RKMDIWindow *widget);
 /** @returns the currently active window */
 	RKMDIWindow *activePage ();
 /** reimplemented form QWidget::setCaption () to emit captionChanged () when the caption changes */



More information about the rkward-tracker mailing list