summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold Dumas <contact@arnolddumas.fr>2014-09-28 10:44:33 (GMT)
committerArnold Dumas <contact@arnolddumas.fr>2014-09-28 10:44:33 (GMT)
commita6db7a2655846740a22888a3d2cb68c8e3d697a2 (patch)
treefdc6b79458645ebd051351c4677d7e60dd6ce6ef
parent146e585f0298a4c68596f7e332946459d0e388c7 (diff)
Port from KInputDialog to QInputDialog.
REVIEW: 120378
-rw-r--r--part.cpp4
-rw-r--r--ui/pageview.cpp6
-rw-r--r--ui/pageviewannotator.cpp4
3 files changed, 8 insertions, 6 deletions
diff --git a/part.cpp b/part.cpp
index a65c7f6..eae7149 100644
--- a/part.cpp
+++ b/part.cpp
@@ -33,6 +33,7 @@
#include <QtPrintSupport/QPrinter>
#include <QtPrintSupport/QPrintDialog>
#include <QScrollBar>
+#include <QInputDialog>
#include <kvbox.h>
#include <kaboutapplicationdialog.h>
@@ -43,7 +44,6 @@
#include <kstandardaction.h>
#include <kpluginfactory.h>
#include <kfiledialog.h>
-#include <kinputdialog.h>
#include <kmessagebox.h>
#include <knuminput.h>
#include <kio/netaccess.h>
@@ -2049,7 +2049,7 @@ void Part::slotRenameBookmark( const DocumentViewport &viewport )
if ( m_document->bookmarkManager()->isBookmarked( viewport ) )
{
KBookmark bookmark = m_document->bookmarkManager()->bookmark( viewport );
- const QString newName = KInputDialog::getText( i18n( "Rename Bookmark" ), i18n( "Enter the new name of the bookmark:" ), bookmark.fullText(), 0, widget());
+ const QString newName = QInputDialog::getText(widget(), i18n( "Rename Bookmark" ), i18n( "Enter the new name of the bookmark:" ), QLineEdit::Normal, bookmark.fullText());
if (!newName.isEmpty())
{
m_document->bookmarkManager()->renameBookmark(&bookmark, newName);
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 3a93d55..9770f52 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -32,6 +32,7 @@
#include <qapplication.h>
#include <qclipboard.h>
#include <qmenu.h>
+#include <QInputDialog>
#include <kaction.h>
#include <kactionmenu.h>
@@ -41,7 +42,6 @@
#include <kfiledialog.h>
#include <kglobal.h>
#include <kglobalsettings.h>
-#include <kinputdialog.h>
#include <kselectaction.h>
#include <ktoggleaction.h>
#include <QtCore/QDebug>
@@ -4743,11 +4743,13 @@ void PageView::slotToggleAnnotator( bool on )
if ( userName.isEmpty() )
{
bool ok = false;
- userName = KInputDialog::getText(
+ userName = QInputDialog::getText(0,
i18n( "Annotations author" ),
i18n( "Please insert your name or initials:" ),
+ QLineEdit::Normal,
QString(),
&ok );
+
if ( !ok )
{
d->aToggleAnnotator->trigger();
diff --git a/ui/pageviewannotator.cpp b/ui/pageviewannotator.cpp
index 59ea9a0..25858f3 100644
--- a/ui/pageviewannotator.cpp
+++ b/ui/pageviewannotator.cpp
@@ -19,10 +19,10 @@
#include <qpainter.h>
#include <qset.h>
#include <qvariant.h>
+#include <QInputDialog>
#include <kiconloader.h>
#include <klocale.h>
#include <kstandarddirs.h>
-#include <kinputdialog.h>
#include <kuser.h>
#include <QtCore/QDebug>
#include <kmenu.h>
@@ -163,7 +163,7 @@ class PickPointEngine : public AnnotatorEngine
//note dialog
const QString prompt = i18n( "Text of the new note:" );
bool resok;
- const QString note = KInputDialog::getMultiLineText( i18n( "New Text Note" ), prompt, QString(), &resok );
+ const QString note = QInputDialog::getMultiLineText(0, i18n( "New Text Note" ), prompt, QString(), &resok);
if(resok)
{
//add note