Port from KInputDialog to QInputDialog.

REVIEW: 120378
frameworks
Arnold Dumas 12 years ago
parent 146e585f02
commit a6db7a2655
  1. 4
      part.cpp
  2. 6
      ui/pageview.cpp
  3. 4
      ui/pageviewannotator.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);

@ -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();

@ -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

Loading…
Cancel
Save