summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-03-22 09:00:32 +0100
committerPali Roh├ír <[email protected]>2017-12-22 09:10:22 +0100
commit0583b955ba963f6c754bfa6473efed0c3b65a806 (patch)
tree6462f53fdd6a69fc75d5fa0ee3a054816276fe09
parent4f9facca29a850ff25f37ae4efdd9d7d885c554b (diff)
Port to QInputDialog
-rw-r--r--kopete/config/appearance/appearanceconfig.cpp1
-rw-r--r--kopete/config/chatwindow/chatwindowconfig.cpp1
-rw-r--r--kopete/contactlist/kopetecontactlistview.cpp4
-rw-r--r--kopete/kopetewindow.cpp1
-rw-r--r--libkopete/CMakeLists.txt2
-rw-r--r--libkopete/kopetecommand.cpp4
-rw-r--r--libkopete/kopetecontact.cpp1
-rw-r--r--libkopete/ui/addressbookselectorwidget.cpp4
-rw-r--r--libkopete/ui/metacontactselectorwidget.cpp1
-rw-r--r--plugins/highlight/highlightpreferences.cpp6
-rw-r--r--plugins/privacy/privacypreferences.cpp1
-rw-r--r--protocols/bonjour/CMakeLists.txt25
-rw-r--r--protocols/jabber/jabberaccount.cpp6
-rw-r--r--protocols/jabber/jabbercontact.cpp6
-rw-r--r--protocols/jabber/jabbergroupcontact.cpp6
-rw-r--r--protocols/jabber/jabbergroupmembercontact.cpp2
-rw-r--r--protocols/jabber/jabberprotocol.cpp6
-rw-r--r--protocols/jabber/ui/dlgjabberbookmarkeditor.cpp6
-rw-r--r--protocols/jabber/ui/privacydlg.cpp4
-rw-r--r--protocols/oscar/icq/icqcontact.cpp6
-rw-r--r--protocols/oscar/oscarcontact.cpp4
21 files changed, 43 insertions, 54 deletions
diff --git a/kopete/config/appearance/appearanceconfig.cpp b/kopete/config/appearance/appearanceconfig.cpp
index f559dee..531b4a7 100644
--- a/kopete/config/appearance/appearanceconfig.cpp
+++ b/kopete/config/appearance/appearanceconfig.cpp
@@ -34,7 +34,6 @@
#include <QVBoxLayout>
#include <kdeversion.h>
-#include <kinputdialog.h>
#include <kcolorcombo.h>
#include <kcolorbutton.h>
diff --git a/kopete/config/chatwindow/chatwindowconfig.cpp b/kopete/config/chatwindow/chatwindowconfig.cpp
index 1103ee0..be9a936 100644
--- a/kopete/config/chatwindow/chatwindowconfig.cpp
+++ b/kopete/config/chatwindow/chatwindowconfig.cpp
@@ -33,7 +33,6 @@
#include <QVBoxLayout>
#include <kdeversion.h>
-#include <kinputdialog.h>
#include <kcolorcombo.h>
#include <kcolorbutton.h>
#include <kdebug.h>
diff --git a/kopete/contactlist/kopetecontactlistview.cpp b/kopete/contactlist/kopetecontactlistview.cpp
index 0b1a6aa..056f2e0 100644
--- a/kopete/contactlist/kopetecontactlistview.cpp
+++ b/kopete/contactlist/kopetecontactlistview.cpp
@@ -37,7 +37,7 @@
#include <KActionCollection>
#include <KXmlGuiWindow>
#include <KLocalizedString>
-#include <KInputDialog>
+#include <QInputDialog>
#include <KMessageBox>
#include <kmessagebox_queued.h>
#include <KToolInvocation>
@@ -344,7 +344,7 @@ void KopeteContactListView::mergeMetaContact()
void KopeteContactListView::addGroup()
{
- QString groupName = KInputDialog::getText( i18n( "New Group" ),
+ QString groupName = QInputDialog::getText(this, i18n( "New Group" ),
i18n( "Please enter the name for the new group:" ) );
if ( !groupName.isEmpty() )
diff --git a/kopete/kopetewindow.cpp b/kopete/kopetewindow.cpp
index cb984e7..0b78747 100644
--- a/kopete/kopetewindow.cpp
+++ b/kopete/kopetewindow.cpp
@@ -61,7 +61,6 @@
#include <kstatusbar.h>
#include <kwindowsystem.h>
#include <kdeversion.h>
-#include <kinputdialog.h>
#include <kplugininfo.h>
#include <ksqueezedtextlabel.h>
#include <kstringhandler.h>
diff --git a/libkopete/CMakeLists.txt b/libkopete/CMakeLists.txt
index 85a98f0..588d6c4 100644
--- a/libkopete/CMakeLists.txt
+++ b/libkopete/CMakeLists.txt
@@ -170,8 +170,6 @@ set(libkopete_kf5_link_libs
)
target_link_libraries(kopete
- ${QT_QTXML_LIBRARIES}
- ${KDE4_KEMOTICONS_LIBS}
${libkopete_kf5_link_libs}
)
diff --git a/libkopete/kopetecommand.cpp b/libkopete/kopetecommand.cpp
index 81fc4e7..236fc5f 100644
--- a/libkopete/kopetecommand.cpp
+++ b/libkopete/kopetecommand.cpp
@@ -24,7 +24,7 @@
#include <kauthorized.h>
#include <kdebug.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <KLocalizedString>
#include <QIcon>
#include <kmessagebox.h>
@@ -88,7 +88,7 @@ void Kopete::Command::slotAction()
QString args;
if( m_minArgs > 0 )
{
- args = KInputDialog::getText( i18n("Enter Arguments"), i18n("Enter the arguments to %1:", m_command) );
+ args = QInputDialog::getText(0, i18n("Enter Arguments"), i18n("Enter the arguments to %1:", m_command) );
if( args.isNull() )
return;
}
diff --git a/libkopete/kopetecontact.cpp b/libkopete/kopetecontact.cpp
index 470b954..bc16812 100644
--- a/libkopete/kopetecontact.cpp
+++ b/libkopete/kopetecontact.cpp
@@ -30,7 +30,6 @@
#include <QWidget>
#include <kdeversion.h>
-#include <kinputdialog.h>
#include <kabcpersistence.h>
#include <kmessagebox.h>
#include <kmessagebox_queued.h>
diff --git a/libkopete/ui/addressbookselectorwidget.cpp b/libkopete/ui/addressbookselectorwidget.cpp
index 4f5dd07..a6d6d3f 100644
--- a/libkopete/ui/addressbookselectorwidget.cpp
+++ b/libkopete/ui/addressbookselectorwidget.cpp
@@ -31,7 +31,7 @@
#include <kiconloader.h>
#include <kdeversion.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <QPushButton>
#include <kdebug.h>
@@ -149,7 +149,7 @@ void AddressBookSelectorWidget::setLabelMessage( const QString &msg )
void AddressBookSelectorWidget::slotAddAddresseeClicked()
{
// Pop up add addressee dialog
- QString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), QString(), 0, this );
+ QString addresseeName = QInputDialog::getText( this, i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ));
if ( !addresseeName.isEmpty() )
{
diff --git a/libkopete/ui/metacontactselectorwidget.cpp b/libkopete/ui/metacontactselectorwidget.cpp
index ae84528..1ec254b 100644
--- a/libkopete/ui/metacontactselectorwidget.cpp
+++ b/libkopete/ui/metacontactselectorwidget.cpp
@@ -32,7 +32,6 @@
#include <kiconloader.h>
#include <kdeversion.h>
-#include <kinputdialog.h>
#include <QPushButton>
#include <kdebug.h>
#include <QTreeWidget>
diff --git a/plugins/highlight/highlightpreferences.cpp b/plugins/highlight/highlightpreferences.cpp
index 659851a..d41588e 100644
--- a/plugins/highlight/highlightpreferences.cpp
+++ b/plugins/highlight/highlightpreferences.cpp
@@ -30,7 +30,7 @@
#include <kgenericfactory.h>
#include <kservicetypetrader.h>
#include <kcolorbutton.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <kurlrequester.h>
#include <kregexpeditorinterface.h>
#include <kdebug.h>
@@ -195,8 +195,8 @@ void HighlightPreferences::slotRenameFilter()
return;
bool ok;
- const QString newname = KInputDialog::getText(
- i18n( "Rename Filter" ), i18n( "Please enter the new name for the filter:" ), current->displayName, &ok );
+ const QString newname = QInputDialog::getText( this,
+ i18n( "Rename Filter" ), i18n( "Please enter the new name for the filter:" ), QLineEdit::Normal, current->displayName, &ok );
if( !ok )
return;
current->displayName=newname;
diff --git a/plugins/privacy/privacypreferences.cpp b/plugins/privacy/privacypreferences.cpp
index 1d0b025..d81b726 100644
--- a/plugins/privacy/privacypreferences.cpp
+++ b/plugins/privacy/privacypreferences.cpp
@@ -22,7 +22,6 @@
#include <QPointer>
#include <kgenericfactory.h>
-#include <kinputdialog.h>
#include <kdialog.h>
#include <kvbox.h>
diff --git a/protocols/bonjour/CMakeLists.txt b/protocols/bonjour/CMakeLists.txt
index 924f04c..c0fe2f3 100644
--- a/protocols/bonjour/CMakeLists.txt
+++ b/protocols/bonjour/CMakeLists.txt
@@ -11,27 +11,24 @@ add_subdirectory( icons )
find_package(KF5 ${KF5_VERSION} REQUIRED COMPONENTS KIO DNSSD)
set(kopete_bonjour_PART_SRCS
- bonjourprotocol.cpp
- bonjourcontact.cpp
- bonjouraccount.cpp
- bonjouraddcontactpage.cpp
- bonjoureditaccountwidget.cpp
- bonjourcontactconnection.cpp
-)
+ bonjourprotocol.cpp
+ bonjourcontact.cpp
+ bonjouraccount.cpp
+ bonjouraddcontactpage.cpp
+ bonjoureditaccountwidget.cpp
+ bonjourcontactconnection.cpp
+ )
ki18n_wrap_ui(kopete_bonjour_PART_SRCS
-bonjouraddui.ui
-)
-
-ki18n_wrap_ui(kopete_bonjour_PART_SRCS
-bonjouraccountpreferences.ui
-)
+ bonjouraddui.ui
+ bonjouraccountpreferences.ui
+ )
add_library(kopete_bonjour MODULE ${kopete_bonjour_PART_SRCS})
target_link_libraries(kopete_bonjour KF5::KIOCore KF5::IdentityManagement KF5::DNSSD kopete)
if(NOT DISABLE_VIDEOSUPPORT)
- target_link_libraries(kopete_bonjour kopete_videodevice)
+ target_link_libraries(kopete_bonjour kopete_videodevice)
endif(NOT DISABLE_VIDEOSUPPORT)
install(TARGETS kopete_bonjour DESTINATION ${PLUGIN_INSTALL_DIR})
diff --git a/protocols/jabber/jabberaccount.cpp b/protocols/jabber/jabberaccount.cpp
index 8f8ae73..c9624b7 100644
--- a/protocols/jabber/jabberaccount.cpp
+++ b/protocols/jabber/jabberaccount.cpp
@@ -47,7 +47,7 @@
#include <KLocalizedString>
#include <kaboutdata.h>
#include <kpassworddialog.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <kicon.h>
#include <kactionmenu.h>
#include <kglobal.h>
@@ -1657,8 +1657,8 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q
case JabberClient::NicknameConflict:
{
bool ok;
- QString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use", jid.node(), jid.resource()),
- i18n("Provide your nickname"),
+ QString nickname = QInputDialog::getText(nullptr, i18n("Error trying to join %1 : nickname %2 is already in use", jid.node(), jid.resource()),
+ i18n("Provide your nickname"), QLineEdit::Normal,
QString(),
&ok);
if (ok)
diff --git a/protocols/jabber/jabbercontact.cpp b/protocols/jabber/jabbercontact.cpp
index 0b2290b..15d4214 100644
--- a/protocols/jabber/jabbercontact.cpp
+++ b/protocols/jabber/jabbercontact.cpp
@@ -41,7 +41,7 @@
#include <kicon.h>
#include <kstandarddirs.h>
#include <kio/netaccess.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <kopeteview.h>
#include "kopetecontactlist.h"
@@ -324,8 +324,8 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
message.from().full(), room , originalBody);
bool ok=false;
- QString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ),
- mes, QString() , &ok , (mManager ? dynamic_cast<QWidget*>(mManager->view(false)) : 0) );
+ QString futureNewNickName = QInputDialog::getText( (mManager ? dynamic_cast<QWidget*>(mManager->view(false)) : 0), i18n( "Invited to a conference - Jabber Plugin" ),
+ mes,QLineEdit::Normal, QString() , &ok );
if ( !ok || !account()->isConnected() || futureNewNickName.isEmpty() )
return;
diff --git a/protocols/jabber/jabbergroupcontact.cpp b/protocols/jabber/jabbergroupcontact.cpp
index 2da39ff..31e292b 100644
--- a/protocols/jabber/jabbergroupcontact.cpp
+++ b/protocols/jabber/jabbergroupcontact.cpp
@@ -21,7 +21,7 @@
#include <kdebug.h>
#include <KLocalizedString>
#include <kfiledialog.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <QAction>
#include "jabberprotocol.h"
@@ -418,8 +418,8 @@ void JabberGroupContact::slotChangeNick( )
{
bool ok;
- QString futureNewNickName = KInputDialog::getText( i18n( "Change nickname - Jabber Plugin" ),
- i18n( "Please enter the new nickname you want to have in the room <i>%1</i>" , rosterItem().jid().bare()),
+ QString futureNewNickName = QInputDialog::getText( nullptr, i18n( "Change nickname - Jabber Plugin" ),
+ i18n( "Please enter the new nickname you want to have in the room <i>%1</i>" , rosterItem().jid().bare()), QLineEdit::Normal,
mNick, &ok );
if ( !ok || !account()->isConnected())
return;
diff --git a/protocols/jabber/jabbergroupmembercontact.cpp b/protocols/jabber/jabbergroupmembercontact.cpp
index a1c000c..eefd057 100644
--- a/protocols/jabber/jabbergroupmembercontact.cpp
+++ b/protocols/jabber/jabbergroupmembercontact.cpp
@@ -126,7 +126,7 @@ void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &mess
message.from().full(), room , originalBody);
bool ok=false;
- QString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ),
+ QString futureNewNickName = QInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ),
mes, QString() , &ok , (mManager ? dynamic_cast<QWidget*>(mManager->view(false)) : 0) );
if ( !ok || !account()->isConnected() || futureNewNickName.isEmpty() )
return;
diff --git a/protocols/jabber/jabberprotocol.cpp b/protocols/jabber/jabberprotocol.cpp
index e8dd290..1a069a3 100644
--- a/protocols/jabber/jabberprotocol.cpp
+++ b/protocols/jabber/jabberprotocol.cpp
@@ -355,7 +355,7 @@ XMPP::Status JabberProtocol::kosToStatus( const Kopete::OnlineStatus & status ,
#include "jabbercontactpool.h"
#include <kopeteview.h>
#include <kmessagebox.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <KConfigGroup>
#include <QDialogButtonBox>
#include <QPushButton>
@@ -509,8 +509,8 @@ void JabberProtocol::handleURL(const QString&, const QUrl &url) const
if(nick.isEmpty())
{
bool ok=true;
- nick = KInputDialog::getText(i18n("Please enter your nickname for the room %1", jid.bare()),
- i18n("Provide your nickname"),
+ nick = QInputDialog::getText(nullptr, i18n("Please enter your nickname for the room %1", jid.bare()),
+ i18n("Provide your nickname"), QLineEdit::Normal,
QString(),
&ok);
if (!ok)
diff --git a/protocols/jabber/ui/dlgjabberbookmarkeditor.cpp b/protocols/jabber/ui/dlgjabberbookmarkeditor.cpp
index 33053f2..e2afbec 100644
--- a/protocols/jabber/ui/dlgjabberbookmarkeditor.cpp
+++ b/protocols/jabber/ui/dlgjabberbookmarkeditor.cpp
@@ -14,7 +14,7 @@
#include "dlgjabberbookmarkeditor.h"
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <QtCore/QAbstractListModel>
@@ -135,8 +135,8 @@ void DlgJabberBookmarkEditor::renameBookmark()
const QModelIndex index = m_ui.listView->selectionModel()->selectedRows().first();
- const QString name = KInputDialog::getText( i18n( "Group Chat Name" ),
- i18n( "Enter a name for the group chat:" ),
+ const QString name = QInputDialog::getText( nullptr, i18n( "Group Chat Name" ),
+ i18n( "Enter a name for the group chat:" ), QLineEdit::Normal,
index.data( JabberBookmarkModel::NameRole ).toString() );
if ( !name.isEmpty() ) {
diff --git a/protocols/jabber/ui/privacydlg.cpp b/protocols/jabber/ui/privacydlg.cpp
index f70d9b9..7ed1d91 100644
--- a/protocols/jabber/ui/privacydlg.cpp
+++ b/protocols/jabber/ui/privacydlg.cpp
@@ -21,7 +21,7 @@
#include "privacydlg.h"
#include <QListView>
-#include <KInputDialog>
+#include <QInputDialog>
#include <KMessageBox>
#include "jabberaccount.h"
@@ -308,7 +308,7 @@ void PrivacyDlg::newList()
bool ok = false;
QString name;
while (!done) {
- name = KInputDialog::getText(i18n("New List"), i18n("Enter the name of the new list:"), QString(), &ok, this);
+ name = QInputDialog::getText(this, i18n("New List"), i18n("Enter the name of the new list:"), QLineEdit::Normal, QString(), &ok);
if (!ok) {
done = true;
}
diff --git a/protocols/oscar/icq/icqcontact.cpp b/protocols/oscar/icq/icqcontact.cpp
index 69e600a..8fb675e 100644
--- a/protocols/oscar/icq/icqcontact.cpp
+++ b/protocols/oscar/icq/icqcontact.cpp
@@ -24,7 +24,7 @@
#include <KActionCollection>
#include <KLocalizedString>
#include <knotification.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <krandom.h>
#include <ktoggleaction.h>
#include <kicon.h>
@@ -269,8 +269,8 @@ void ICQContact::loggedIn()
void ICQContact::slotRequestAuth()
{
- QString reason = KInputDialog::getText( i18n("Request Authorization"),
- i18n("Reason for requesting authorization:"),
+ QString reason = QInputDialog::getText( nullptr, i18n("Request Authorization"),
+ i18n("Reason for requesting authorization:"), QLineEdit::Normal,
i18n("Please authorize me so I can add you to my contact list") );
if ( !reason.isNull() )
mAccount->engine()->requestAuth( contactId(), reason );
diff --git a/protocols/oscar/oscarcontact.cpp b/protocols/oscar/oscarcontact.cpp
index 20ec2b7..8e241c7 100644
--- a/protocols/oscar/oscarcontact.cpp
+++ b/protocols/oscar/oscarcontact.cpp
@@ -35,7 +35,7 @@
#include <kcodecs.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
-#include <kinputdialog.h>
+#include <qinputdialog.h>
#include <kdeversion.h>
#include <kfiledialog.h>
@@ -420,7 +420,7 @@ void OscarContact::requestAuthorization()
"Do you want to send an authorization request?\n\nReason for requesting authorization:",
displayName() );
- QString reason = KInputDialog::getText( i18n("Request Authorization"), info,
+ QString reason = QInputDialog::getText( nullptr, i18n("Request Authorization"), info, QLineEdit::Normal,
i18n("Please authorize me so I can add you to my contact list") );
if ( !reason.isNull() )
mAccount->engine()->requestAuth( contactId(), reason );