summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2017-01-11 10:25:07 +0100
committerGravatar Subsurface <dirk@subsurface-divelog.org>2017-01-12 14:06:54 -0800
commitdb17adfb286efbe7caa284a091947e91b80bfcb1 (patch)
treea4f7278295df6dc20a504f1375593d4b80166f85
parent0f58510ce0244513521296b75281fcc32f72a931 (diff)
downloadsubsurface-db17adfb286efbe7caa284a091947e91b80bfcb1.tar.gz
Make the URL dialog contain QLineEdit
as otherwise pressing RETURN does unexpected things. Signed-off-by: Robert C. Helling <helling@atdotde.de>
-rw-r--r--desktop-widgets/simplewidgets.cpp2
-rw-r--r--desktop-widgets/simplewidgets.h1
-rw-r--r--desktop-widgets/urldialog.ui2
3 files changed, 3 insertions, 2 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index 4a0649626..3769716af 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -412,7 +412,7 @@ URLDialog::URLDialog(QWidget *parent) : QDialog(parent)
QString URLDialog::url() const
{
- return ui.urlField->toPlainText();
+ return ui.urlField->text();
}
bool isGnome3Session()
diff --git a/desktop-widgets/simplewidgets.h b/desktop-widgets/simplewidgets.h
index 3c384ba89..2fc858cd3 100644
--- a/desktop-widgets/simplewidgets.h
+++ b/desktop-widgets/simplewidgets.h
@@ -8,6 +8,7 @@ class QNetworkReply;
#include <QWidget>
#include <QGroupBox>
#include <QDialog>
+#include <QTextEdit>
#include <stdint.h>
#include "ui_renumber.h"
diff --git a/desktop-widgets/urldialog.ui b/desktop-widgets/urldialog.ui
index 397f90a64..bb0426315 100644
--- a/desktop-widgets/urldialog.ui
+++ b/desktop-widgets/urldialog.ui
@@ -29,7 +29,7 @@
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
- <widget class="QPlainTextEdit" name="urlField">
+ <widget class="QLineEdit" name="urlField">
<property name="geometry">
<rect>
<x>10</x>