Commit afa51750 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Blogilo: Port away from KLineEdit and KComboBox

parent 02654c11
......@@ -64,7 +64,18 @@ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../icons/*-apps-blogilo.png")
ecm_add_app_icon(blogilo_SRCS ICONS ${ICONS_SRCS})
add_executable( blogilo ${blogilo_SRCS})
target_link_libraries( blogilo kdepim KF5::TextEditor KF5::WebKit KF5::Blog composereditorng pimcommon KF5::Wallet Qt5::Sql KF5::XmlRpcClient KF5::DBusAddons)
target_link_libraries(blogilo
kdepim
composereditorng
pimcommon
KF5::TextEditor
KF5::WebKit
KF5::Blog
KF5::Wallet
Qt5::Sql
KF5::XmlRpcClient
KF5::DBusAddons
)
if (KF5GAPI_FOUND)
target_link_libraries( blogilo KF5::GAPIBlogger KF5::GAPICore)
......
......@@ -91,17 +91,17 @@ AddEditBlog::AddEditBlog(int blog_id, QWidget *parent, Qt::WindowFlags flags)
d->isNewBlog = true;
d->mFetchAPITimer = d->mFetchBlogIdTimer = d->mFetchProfileIdTimer = Q_NULLPTR;
connect(d->ui.txtId, &KLineEdit::textChanged, this, &AddEditBlog::enableOkButton);
connect(d->ui.txtUrl, &KLineEdit::textChanged, this, &AddEditBlog::enableAutoConfBtn);
connect(d->ui.txtId, &QLineEdit::textChanged, this, &AddEditBlog::enableOkButton);
connect(d->ui.txtUrl, &QLineEdit::textChanged, this, &AddEditBlog::enableAutoConfBtn);
connect(d->ui.txtUser, &QLineEdit::textChanged, this, &AddEditBlog::enableAutoConfBtn);
connect(d->ui.txtPass, &KLineEdit::textChanged, this, &AddEditBlog::enableAutoConfBtn);
connect(d->ui.txtPass, &QLineEdit::textChanged, this, &AddEditBlog::enableAutoConfBtn);
connect(d->ui.btnAutoConf, &QPushButton::clicked, this, &AddEditBlog::autoConfigure);
connect(d->ui.btnFetch, &QPushButton::clicked, this, &AddEditBlog::fetchBlogId);
connect(d->ui.comboApi, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &AddEditBlog::slotComboApiChanged);
connect(d->ui.txtUrl, &KLineEdit::returnPressed, this, &AddEditBlog::slotReturnPressed);
connect(d->ui.comboApi, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &AddEditBlog::slotComboApiChanged);
connect(d->ui.txtUrl, &QLineEdit::returnPressed, this, &AddEditBlog::slotReturnPressed);
connect(d->ui.txtUser, &QLineEdit::returnPressed, this, &AddEditBlog::slotReturnPressed);
connect(d->ui.txtPass, &KLineEdit::returnPressed, this, &AddEditBlog::slotReturnPressed);
connect(d->ui.txtId, &KLineEdit::returnPressed, this, &AddEditBlog::slotReturnPressed);
connect(d->ui.txtPass, &QLineEdit::returnPressed, this, &AddEditBlog::slotReturnPressed);
connect(d->ui.txtId, &QLineEdit::returnPressed, this, &AddEditBlog::slotReturnPressed);
if (blog_id > -1) {
setWindowTitle(i18n("Edit blog settings"));
......
......@@ -39,6 +39,7 @@
#include <KToolInvocation>
#include <QClipboard>
#include <QTimer>
#include <QPointer>
#include <qstatusbar.h>
#include "blogilo_debug.h"
#include <kxmlguiwindow.h>
......
......@@ -87,7 +87,7 @@ You can set more options in the Advanced tab.</string>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="KLineEdit" name="txtUrl">
<widget class="QLineEdit" name="txtUrl">
<property name="text">
<string>http://</string>
</property>
......@@ -143,19 +143,13 @@ You can set more options in the Advanced tab.</string>
</widget>
</item>
<item row="8" column="1" colspan="2">
<widget class="KLineEdit" name="txtPass">
<widget class="QLineEdit" name="txtPass">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<property name="urlDropsEnabled">
<bool>false</bool>
</property>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
<property name="passwordMode">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
......@@ -240,7 +234,7 @@ You can set more options in the Advanced tab.</string>
</widget>
</item>
<item row="2" column="1">
<widget class="KComboBox" name="comboApi">
<widget class="QComboBox" name="comboApi">
<item>
<property name="text">
<string>Blogger 1.0 API</string>
......@@ -298,7 +292,7 @@ You can set more options in the Advanced tab.</string>
</widget>
</item>
<item row="3" column="1">
<widget class="KLineEdit" name="txtId"/>
<widget class="QLineEdit" name="txtId"/>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="btnFetch">
......@@ -343,7 +337,7 @@ You can set more options in the Advanced tab.</string>
</widget>
</item>
<item row="4" column="1">
<widget class="KComboBox" name="comboDir">
<widget class="QComboBox" name="comboDir">
<item>
<property name="text">
<string>Left to Right</string>
......@@ -503,18 +497,6 @@ You can set more options in the Advanced tab.</string>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KSeparator</class>
<extends>QFrame</extends>
......
......@@ -264,7 +264,7 @@
</widget>
</item>
<item>
<widget class="KComboBox" name="comboOptionsStatus">
<widget class="QComboBox" name="comboOptionsStatus">
<property name="enabled">
<bool>false</bool>
</property>
......@@ -603,11 +603,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>KSeparator</class>
<extends>QFrame</extends>
......
......@@ -97,7 +97,7 @@
</widget>
</item>
<item>
<widget class="KComboBox" name="kcfg_uploadType"/>
<widget class="QComboBox" name="kcfg_uploadType"/>
</item>
<item>
<spacer name="horizontalSpacer_2">
......@@ -204,11 +204,6 @@
<extends>QWidget</extends>
<header>kimagefilepreview.h</header>
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>kcfg_urlLineEdit</tabstop>
......
......@@ -69,7 +69,7 @@ UploadMediaDialog::UploadMediaDialog(QWidget *parent)
setWindowModality(Qt::ApplicationModal);
ui.kcfg_urlBrowser->setIcon(QIcon::fromTheme(QStringLiteral("document-open")));
connect(ui.kcfg_urlBrowser, &QPushButton::clicked, this, &UploadMediaDialog::selectNewFile);
connect(ui.kcfg_uploadType, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &UploadMediaDialog::slotUploadTypeChanged);
connect(ui.kcfg_uploadType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &UploadMediaDialog::slotUploadTypeChanged);
connect(ui.kcfg_urlLineEdit, &QLineEdit::textChanged, this, &UploadMediaDialog::currentMediaChanged);
}
......
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