Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0583b955 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port to QInputDialog

parent 4f9facca
......@@ -34,7 +34,6 @@
#include <QVBoxLayout>
#include <kdeversion.h>
#include <kinputdialog.h>
#include <kcolorcombo.h>
#include <kcolorbutton.h>
......
......@@ -33,7 +33,6 @@
#include <QVBoxLayout>
#include <kdeversion.h>
#include <kinputdialog.h>
#include <kcolorcombo.h>
#include <kcolorbutton.h>
#include <kdebug.h>
......
......@@ -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() )
......
......@@ -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>
......
......@@ -170,8 +170,6 @@ set(libkopete_kf5_link_libs
)
target_link_libraries(kopete
${QT_QTXML_LIBRARIES}
${KDE4_KEMOTICONS_LIBS}
${libkopete_kf5_link_libs}
)
......
......@@ -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;
}
......
......@@ -30,7 +30,6 @@
#include <QWidget>
#include <kdeversion.h>
#include <kinputdialog.h>
#include <kabcpersistence.h>
#include <kmessagebox.h>
#include <kmessagebox_queued.h>
......
......@@ -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() )
{
......
......@@ -32,7 +32,6 @@
#include <kiconloader.h>
#include <kdeversion.h>
#include <kinputdialog.h>
#include <QPushButton>
#include <kdebug.h>
#include <QTreeWidget>
......
......@@ -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;
......
......@@ -22,7 +22,6 @@
#include <QPointer>
#include <kgenericfactory.h>
#include <kinputdialog.h>
#include <kdialog.h>
#include <kvbox.h>
......
......@@ -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})
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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() ) {
......
......@@ -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;
}
......
......@@ -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 );
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment