From a6db7a2655846740a22888a3d2cb68c8e3d697a2 Mon Sep 17 00:00:00 2001 From: Arnold Dumas Date: Sun, 28 Sep 2014 12:44:33 +0200 Subject: [PATCH] Port from KInputDialog to QInputDialog. REVIEW: 120378 --- part.cpp | 4 ++-- ui/pageview.cpp | 6 ++++-- ui/pageviewannotator.cpp | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/part.cpp b/part.cpp index a65c7f61d..eae7149e7 100644 --- a/part.cpp +++ b/part.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -43,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -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 3a93d55f6..9770f5270 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -41,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -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 59ea9a099..25858f332 100644 --- a/ui/pageviewannotator.cpp +++ b/ui/pageviewannotator.cpp @@ -19,10 +19,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -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