Commit 7aa8fd8a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix look at if log is empty

parent 80ca662c
......@@ -67,6 +67,11 @@ QString LogWidget::toPlainText() const
return mCustomLogWidget->toPlainText();
}
bool LogWidget::isEmpty() const
{
return mCustomLogWidget->isEmpty();
}
void LogWidget::addEndLineLogEntry()
{
mCustomLogWidget->addEndLineLogEntry();
......
......@@ -37,6 +37,7 @@ public:
void clear();
QString toHtml() const;
QString toPlainText() const;
bool isEmpty() const;
private:
KPIM::CustomLogWidget *mCustomLogWidget;
......
......@@ -138,11 +138,11 @@ void PimSettingExporterWindow::slotRestoreFile(const KUrl &url)
void PimSettingExporterWindow::slotSaveLog()
{
const QString log = mLogWidget->toHtml();
if (log.isEmpty()) {
if (mLogWidget->isEmpty()) {
KMessageBox::information(this, i18n("Log is empty."), i18n("Save log"));
return;
}
const QString log = mLogWidget->toHtml();
const QString filter(QLatin1String("*.html"));
PimCommon::Util::saveTextAs(log, filter, this);
}
......
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