Commit 21480258 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove KLineEdit when it's not necessary

parent 35753d7a
......@@ -86,6 +86,7 @@ set(AKONADICONTACT_LIB_VERSION "5.14.40")
set(AKONADINOTE_LIB_VERSION "5.14.40")
set(PIMCOMMON_LIB_VERSION "5.14.40")
set(KGAPI_LIB_VERSION "5.14.40")
set(LIBKDEPIM_LIB_VERSION_LIB "5.14.42")
set( SharedMimeInfo_MINIMUM_VERSION "1.3" )
find_package(SharedMimeInfo ${SharedMimeInfo_MINIMUM_VERSION} REQUIRED)
......@@ -130,6 +131,7 @@ find_package(KF5AkonadiNotes ${AKONADINOTE_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
find_package(KPimGAPI ${KGAPI_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5LibkdepimAkonadi ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
option(KDEPIM_RUN_ISOLATED_TESTS "Run the isolated tests." FALSE)
option(NO_REGENERATE_MIME "Don't regenerate mime file (developer-only option)" FALSE )
......
......@@ -77,7 +77,7 @@ ConfigDialog::ConfigDialog(QWidget *parent)
const int typeIndex = mUi.syncRangeStartType->findData(QVariant(Settings::self()->syncRangeStartType()));
mUi.syncRangeStartType->setCurrentIndex(typeIndex);
connect(mUi.kcfg_displayName, &KLineEdit::textChanged, this, &ConfigDialog::checkUserInput);
connect(mUi.kcfg_displayName, &QLineEdit::textChanged, this, &ConfigDialog::checkUserInput);
connect(mUi.configuredUrls->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ConfigDialog::checkConfiguredUrlsButtonsState);
connect(mUi.configuredUrls, &QAbstractItemView::doubleClicked, this, &ConfigDialog::onEditButtonClicked);
......
......@@ -45,7 +45,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="kcfg_displayName"/>
<widget class="QLineEdit" name="kcfg_displayName"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
......@@ -314,11 +314,6 @@
<extends>QWidget</extends>
<header>kpasswordlineedit.h</header>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
......
......@@ -53,8 +53,8 @@ SearchDialog::SearchDialog(QWidget *parent)
mainLayout->addWidget(buttonBox);
buttonBox->button(QDialogButtonBox::Ok)->setText(i18n("Add Selected Items"));
connect(mUi.searchUrl, &KLineEdit::textChanged, this, &SearchDialog::checkUserInput);
connect(mUi.searchParam, &KLineEdit::textChanged, this, &SearchDialog::checkUserInput);
connect(mUi.searchUrl, &QLineEdit::textChanged, this, &SearchDialog::checkUserInput);
connect(mUi.searchParam, &QLineEdit::textChanged, this, &SearchDialog::checkUserInput);
connect(mUi.searchButton, &QPushButton::clicked, this, &SearchDialog::search);
checkUserInput();
......
......@@ -63,7 +63,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="username"/>
<widget class="QLineEdit" name="username"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
......@@ -79,7 +79,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="password">
<widget class="QLineEdit" name="password">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
......@@ -98,7 +98,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="searchUrl"/>
<widget class="QLineEdit" name="searchUrl"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
......@@ -124,7 +124,7 @@
</widget>
</item>
<item>
<widget class="KLineEdit" name="searchParam"/>
<widget class="QLineEdit" name="searchParam"/>
</item>
</layout>
</item>
......@@ -188,13 +188,6 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
......
......@@ -25,7 +25,7 @@
#include "utils.h"
#include "davresource_debug.h"
#include <KLineEdit>
#include <QLineEdit>
#include <KLocalizedString>
#include <KWallet>
......
......@@ -22,7 +22,7 @@
#include <KPasswordLineEdit>
#include <QIcon>
#include <KLocalizedString>
#include <KLineEdit>
#include <QLineEdit>
#include <KService>
#include <KServiceTypeTrader>
#include <QTextBrowser>
......@@ -224,7 +224,7 @@ CredentialsPage::CredentialsPage(QWidget *parent)
QFormLayout *layout = new QFormLayout(this);
mUserName = new KLineEdit;
mUserName = new QLineEdit;
layout->addRow(i18n("User:"), mUserName);
registerField(QStringLiteral("credentialsUserName*"), mUserName);
......@@ -390,12 +390,12 @@ ConnectionPage::ConnectionPage(QWidget *parent)
mLayout = new QFormLayout(this);
QRegExp hostnameRegexp(QStringLiteral("^[a-z0-9][.a-z0-9-]*[a-z0-9](?::[0-9]+)?$"));
mHost = new KLineEdit;
mHost = new QLineEdit;
registerField(QStringLiteral("connectionHost*"), mHost);
mHost->setValidator(new QRegExpValidator(hostnameRegexp, this));
mLayout->addRow(i18n("Host"), mHost);
mPath = new KLineEdit;
mPath = new QLineEdit;
mLayout->addRow(i18n("Installation path"), mPath);
registerField(QStringLiteral("installationPath"), mPath);
......@@ -404,8 +404,8 @@ ConnectionPage::ConnectionPage(QWidget *parent)
registerField(QStringLiteral("connectionUseSecureConnection"), mUseSecureConnection);
mLayout->addRow(QString(), mUseSecureConnection);
connect(mHost, &KLineEdit::textChanged, this, &ConnectionPage::urlElementChanged);
connect(mPath, &KLineEdit::textChanged, this, &ConnectionPage::urlElementChanged);
connect(mHost, &QLineEdit::textChanged, this, &ConnectionPage::urlElementChanged);
connect(mPath, &QLineEdit::textChanged, this, &ConnectionPage::urlElementChanged);
connect(mUseSecureConnection, &QCheckBox::toggled, this, &ConnectionPage::urlElementChanged);
}
......
......@@ -26,7 +26,7 @@
#include <QLabel>
class KJob;
class KLineEdit;
class QLineEdit;
class QTextBrowser;
class QButtonGroup;
......@@ -89,7 +89,7 @@ public:
int nextId() const override;
private:
KLineEdit *mUserName = nullptr;
QLineEdit *mUserName = nullptr;
KPasswordLineEdit *mPassword = nullptr;
};
......@@ -121,8 +121,8 @@ public:
private:
void urlElementChanged();
QFormLayout *mLayout = nullptr;
KLineEdit *mHost = nullptr;
KLineEdit *mPath = nullptr;
QLineEdit *mHost = nullptr;
QLineEdit *mPath = nullptr;
QCheckBox *mUseSecureConnection = nullptr;
QFormLayout *mPreviewLayout = nullptr;
QLabel *mCalDavUrlLabel = nullptr;
......
......@@ -60,9 +60,9 @@ UrlConfigurationDialog::UrlConfigurationDialog(QWidget *parent)
mRemoteProtocolGroup->addButton(mUi.carddav, KDAV::CardDav);
mRemoteProtocolGroup->addButton(mUi.groupdav, KDAV::GroupDav);
connect(mRemoteProtocolGroup, QOverload<QAbstractButton *, bool>::of(&QButtonGroup::buttonToggled), this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.remoteUrl, &KLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.remoteUrl, &QLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.useDefaultCreds, &QRadioButton::toggled, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.username, &KLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.username, &QLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.password, &KPasswordLineEdit::passwordChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.fetchButton, &QPushButton::clicked, this, &UrlConfigurationDialog::onFetchButtonClicked);
......
......@@ -81,7 +81,7 @@
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="1">
<widget class="KLineEdit" name="remoteUrl"/>
<widget class="QLineEdit" name="remoteUrl"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="useDefaultCreds">
......@@ -120,7 +120,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="username"/>
<widget class="QLineEdit" name="username"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
......@@ -207,11 +207,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>KPasswordLineEdit</class>
<extends>QWidget</extends>
......
......@@ -167,14 +167,14 @@ EwsConfigDialog::EwsConfigDialog(EwsResource *parentResource, EwsClient &client,
connect(okButton, &QPushButton::clicked, this, &EwsConfigDialog::save);
connect(mUi->autodiscoverButton, &QPushButton::clicked, this, &EwsConfigDialog::performAutoDiscovery);
connect(mUi->kcfg_Username, &KLineEdit::textChanged, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_Username, &QLineEdit::textChanged, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->passwordEdit, &KPasswordLineEdit::passwordChanged, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_Domain, &KLineEdit::textChanged, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_Domain, &QLineEdit::textChanged, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_HasDomain, &QCheckBox::toggled, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_Email, &KLineEdit::textChanged, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_Email, &QLineEdit::textChanged, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->authUsernameRadioButton, &QRadioButton::toggled, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->authOAuth2RadioButton, &QRadioButton::toggled, this, &EwsConfigDialog::setAutoDiscoveryNeeded);
connect(mUi->kcfg_BaseUrl, &KLineEdit::textChanged, this, &EwsConfigDialog::enableTryConnect);
connect(mUi->kcfg_BaseUrl, &QLineEdit::textChanged, this, &EwsConfigDialog::enableTryConnect);
connect(mUi->tryConnectButton, &QPushButton::clicked, this, &EwsConfigDialog::tryConnect);
connect(mUi->userAgentCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EwsConfigDialog::userAgentChanged);
connect(mUi->clearFolderTreeSyncStateButton, &QPushButton::clicked, mParentResource,
......
......@@ -50,7 +50,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="accountName">
<widget class="QLineEdit" name="accountName">
<property name="whatsThis">
<string>This is the account name that will appear in all Akonadi applications</string>
</property>
......@@ -64,7 +64,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="kcfg_Email">
<widget class="QLineEdit" name="kcfg_Email">
<property name="whatsThis">
<string>The e-mail address of this account</string>
</property>
......@@ -139,7 +139,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="kcfg_Domain">
<widget class="QLineEdit" name="kcfg_Domain">
<property name="enabled">
<bool>false</bool>
</property>
......@@ -179,7 +179,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="kcfg_Username">
<widget class="QLineEdit" name="kcfg_Username">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The username used to login to the Exchange server.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Note:&lt;/span&gt; This can be left empty when using Kerberos authentication.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
......@@ -246,7 +246,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="kcfg_BaseUrl">
<widget class="QLineEdit" name="kcfg_BaseUrl">
<property name="enabled">
<bool>false</bool>
</property>
......@@ -751,11 +751,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>KPasswordLineEdit</class>
<extends>QWidget</extends>
......
......@@ -87,6 +87,7 @@ target_link_libraries(imapresource
KF5::WindowSystem
akonadi-singlefileresource
KF5::PimCommon
KF5::Libkdepim
)
########### next target ###############
......
......@@ -38,6 +38,7 @@
#include <MailTransport/Transport>
#include <MailTransport/ServerTest>
#include <Libkdepim/LineEditCatchReturnKey>
#include <kmime/kmime_message.h>
......@@ -141,6 +142,13 @@ SetupServer::SetupServer(ImapResourceBase *parentResource, WId parent)
mainLayout->addWidget(buttonBox);
m_ui->setupUi(mainWidget);
new KPIM::LineEditCatchReturnKey(m_ui->accountName, this);
new KPIM::LineEditCatchReturnKey(m_ui->imapServer, this);
new KPIM::LineEditCatchReturnKey(m_ui->userName, this);
new KPIM::LineEditCatchReturnKey(m_ui->alternateURL, this);
new KPIM::LineEditCatchReturnKey(m_ui->customUsername, this);
m_folderArchiveSettingPage = new FolderArchiveSettingPage(m_parentResource->identifier());
m_ui->tabWidget->addTab(m_folderArchiveSettingPage, i18n("Archive Folder"));
m_ui->safeImapGroup->setId(m_ui->noRadio, KIMAP::LoginJob::Unencrypted);
......@@ -174,10 +182,10 @@ SetupServer::SetupServer(ImapResourceBase *parentResource, WId parent)
connect(m_ui->testButton, &QPushButton::pressed, this, &SetupServer::slotTest);
connect(m_ui->imapServer, &KLineEdit::textChanged, this, &SetupServer::slotServerChanged);
connect(m_ui->imapServer, &KLineEdit::textChanged, this, &SetupServer::slotTestChanged);
connect(m_ui->imapServer, &KLineEdit::textChanged, this, &SetupServer::slotComplete);
connect(m_ui->userName, &KLineEdit::textChanged, this, &SetupServer::slotComplete);
connect(m_ui->imapServer, &QLineEdit::textChanged, this, &SetupServer::slotServerChanged);
connect(m_ui->imapServer, &QLineEdit::textChanged, this, &SetupServer::slotTestChanged);
connect(m_ui->imapServer, &QLineEdit::textChanged, this, &SetupServer::slotComplete);
connect(m_ui->userName, &QLineEdit::textChanged, this, &SetupServer::slotComplete);
connect(m_ui->subscriptionEnabled, &QCheckBox::toggled, this, &SetupServer::slotSubcriptionCheckboxChanged);
connect(m_ui->subscriptionButton, &QPushButton::pressed, this, &SetupServer::slotManageSubscriptions);
......
......@@ -21,7 +21,6 @@
#ifndef SETUPSERVER_H
#define SETUPSERVER_H
#include <KLineEdit>
#include <QDialog>
#include <collection.h>
#include <KJob>
......
......@@ -47,10 +47,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="accountName">
<property name="trapReturnKey" stdset="0">
<bool>true</bool>
</property>
<widget class="QLineEdit" name="accountName">
</widget>
</item>
<item row="1" column="0">
......@@ -67,10 +64,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="imapServer">
<property name="trapReturnKey" stdset="0">
<bool>true</bool>
</property>
<widget class="QLineEdit" name="imapServer">
</widget>
</item>
<item row="2" column="0">
......@@ -87,10 +81,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="KLineEdit" name="userName">
<property name="trapReturnKey" stdset="0">
<bool>true</bool>
</property>
<widget class="QLineEdit" name="userName">
</widget>
</item>
<item row="3" column="0">
......@@ -229,10 +220,7 @@
</widget>
</item>
<item>
<widget class="KLineEdit" name="alternateURL">
<property name="trapReturnKey" stdset="0">
<bool>true</bool>
</property>
<widget class="QLineEdit" name="alternateURL">
</widget>
</item>
</layout>
......@@ -244,10 +232,7 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="1">
<widget class="KLineEdit" name="customUsername">
<property name="trapReturnKey" stdset="0">
<bool>true</bool>
</property>
<widget class="QLineEdit" name="customUsername">
</widget>
</item>
<item row="1" column="0" colspan="2">
......@@ -670,12 +655,6 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KPluralHandlingSpinBox</class>
<extends>QSpinBox</extends>
......
......@@ -46,8 +46,8 @@ ConfigWidget::ConfigWidget(Settings *settings, QWidget *parent)
mManager = new KConfigDialogManager(this, settings);
connect(mServerEdit, &KLineEdit::textChanged, this, &ConfigWidget::updateButtonState);
connect(mUserEdit, &KLineEdit::textChanged, this, &ConfigWidget::updateButtonState);
connect(mServerEdit, &QLineEdit::textChanged, this, &ConfigWidget::updateButtonState);
connect(mUserEdit, &QLineEdit::textChanged, this, &ConfigWidget::updateButtonState);
connect(mCheckConnectionButton, &QPushButton::clicked, this, &ConfigWidget::checkConnection);
resize(QSize(410, 200));
......
......@@ -24,7 +24,7 @@
class KConfigDialogManager;
class KJob;
class KLineEdit;
class QLineEdit;
class QPushButton;
class Settings;
class ConfigWidget : public QWidget
......@@ -44,9 +44,9 @@ private Q_SLOTS:
private:
KConfigDialogManager *mManager = nullptr;
KLineEdit *mServerEdit = nullptr;
KLineEdit *mUserEdit = nullptr;
KLineEdit *mPasswordEdit = nullptr;
QLineEdit *mServerEdit = nullptr;
QLineEdit *mUserEdit = nullptr;
QLineEdit *mPasswordEdit = nullptr;
QPushButton *mCheckConnectionButton = nullptr;
};
......
......@@ -52,7 +52,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="kcfg_BaseUrl">
<widget class="QLineEdit" name="kcfg_BaseUrl">
<property name="toolTip">
<string>The URL of the Open-Xchange server, should be something like https://myserver.org/</string>
</property>
......@@ -84,7 +84,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="kcfg_Username">
<widget class="QLineEdit" name="kcfg_Username">
<property name="toolTip">
<string>The username that is used to log into the Open-Xchange server</string>
</property>
......@@ -113,7 +113,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="KLineEdit" name="kcfg_Password">
<widget class="QLineEdit" name="kcfg_Password">
<property name="toolTip">
<string>The password that is used to log into the Open-Xchange server</string>
</property>
......@@ -140,14 +140,6 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
......@@ -83,4 +83,5 @@ target_link_libraries(pop3config
KF5::AkonadiWidgets
KF5::AkonadiAgentBase
KF5::AkonadiMime
KF5::Libkdepim
)
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