Commit 771df040 authored by Laurent Montel's avatar Laurent Montel 😁

Remove deprecated method

parent a0ffb572
......@@ -138,7 +138,7 @@ endif()
# Extra package
find_package(Gpgmepp 1.8.0 CONFIG)
set_package_properties(Gpgmepp PROPERTIES DESCRIPTION "GpgME library" URL "http://www.gnupg.org" TYPE REQUIRED)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
if(KDEPIMADDONS_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
......
......@@ -22,6 +22,7 @@
#include <messagecomposer/plugineditorinterface.h>
#include <QPointer>
#include <QHash>
class SelectMailDialog;
class ShortUrlEngineInterface;
class InsertShorturlPluginEditorInterface : public MessageComposer::PluginEditorInterface
......
......@@ -65,7 +65,7 @@ void ConfirmAddressWidget::createAddressItems(const QStringList &address, bool v
} else {
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
item->setCheckState(Qt::Unchecked);
item->setTextColor(Qt::red);
item->setForeground(Qt::red);
}
mListEmails->addItem(item);
}
......
......@@ -39,7 +39,7 @@ void GrammalecteGenerateConfigOptionJob::start()
mProcess->setProgram(mPythonPath);
mProcess->setArguments(QStringList() << mGrammarlecteCliPath << QStringLiteral("-lo"));
connect(mProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &GrammalecteGenerateConfigOptionJob::slotFinished);
connect(mProcess, QOverload<QProcess::ProcessError>::of(&QProcess::error),
connect(mProcess, QOverload<QProcess::ProcessError>::of(&QProcess::errorOccurred),
this, &GrammalecteGenerateConfigOptionJob::receivedError);
connect(mProcess, &QProcess::readyReadStandardError, this, &GrammalecteGenerateConfigOptionJob::receivedStdErr);
connect(mProcess, &QProcess::readyReadStandardOutput, this, &GrammalecteGenerateConfigOptionJob::receivedStandardOutput);
......
......@@ -52,7 +52,7 @@ void GrammalecteResultJob::start()
args << QStringLiteral("-f") << file->fileName() << QStringLiteral("-j");
mProcess->setArguments(args);
connect(mProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &GrammalecteResultJob::slotFinished);
connect(mProcess, QOverload<QProcess::ProcessError>::of(&QProcess::error),
connect(mProcess, QOverload<QProcess::ProcessError>::of(&QProcess::errorOccurred),
this, &GrammalecteResultJob::receivedError);
connect(mProcess, &QProcess::readyReadStandardError, this, &GrammalecteResultJob::receivedStdErr);
connect(mProcess, &QProcess::readyReadStandardOutput, this, &GrammalecteResultJob::receivedStandardOutput);
......
......@@ -37,7 +37,7 @@ SendmailJob::SendmailJob(Transport *transport, QObject *parent)
{
mProcess = new QProcess(this);
connect(mProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &SendmailJob::sendmailExited);
connect(mProcess, QOverload<QProcess::ProcessError>::of(&QProcess::error),
connect(mProcess, QOverload<QProcess::ProcessError>::of(&QProcess::errorOccurred),
this, &SendmailJob::receivedError);
connect(mProcess, &QProcess::readyReadStandardError, this, &SendmailJob::receivedStdErr);
}
......
......@@ -126,7 +126,7 @@ void PgpKeyMessagePart::parseContent(KMime::Content *node)
mUserID = QString::fromUtf8(cols[9]);
}
if (size > 6) {
mKeyDate = QDateTime::fromTime_t(cols[5].toUInt());
mKeyDate = QDateTime::fromSecsSinceEpoch(cols[5].toUInt());
}
// gpg2: UID is on a separate line
} else if (cols[0] == "uid" && size > 9 && mUserID.isEmpty()) {
......
......@@ -50,7 +50,7 @@ EventEdit::EventEdit(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(5);
vbox->setContentsMargins(5, 5, 5, 5);
vbox->setSpacing(2);
QHBoxLayout *hbox = new QHBoxLayout;
......
......@@ -45,7 +45,7 @@ NoteEdit::NoteEdit(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(5);
vbox->setContentsMargins(5, 5, 5, 5);
vbox->setSpacing(2);
QHBoxLayout *hbox = new QHBoxLayout;
......
......@@ -49,7 +49,7 @@ TodoEdit::TodoEdit(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(5);
vbox->setContentsMargins(5, 5, 5, 5);
vbox->setSpacing(2);
mMsgWidget = new KMessageWidget(this);
......
......@@ -45,22 +45,22 @@ void AdBlockAutomaticRulesListWidget::updateItem(QListWidgetItem *item)
font.setItalic(false);
item->setFont(font);
if (rule.contains(QRegularExpression(QStringLiteral("^@@.*")))) {
item->setTextColor(Qt::magenta);
item->setForeground(Qt::magenta);
} else if (rule.contains(QRegularExpression(QStringLiteral("^\\[.*")))) {
item->setTextColor(Qt::red);
item->setForeground(Qt::red);
} else if (rule.contains(QRegularExpression(QStringLiteral(".*##.*")))) {
item->setTextColor(Qt::blue);
item->setForeground(Qt::blue);
} else {
if (!defaultTextColor.isValid()) {
const QPalette palette = viewport()->palette();
defaultTextColor = palette.text().color();
}
item->setTextColor(defaultTextColor);
item->setForeground(defaultTextColor);
}
} else {
font.setItalic(true);
item->setFont(font);
item->setTextColor(Qt::gray);
item->setForeground(Qt::gray);
}
}
......@@ -85,7 +85,7 @@ void AdBlockAutomaticRulesListWidget::createItem(const QString &rule)
if (rule.startsWith(QLatin1Char('!')) || rule.startsWith(QLatin1Char('['))) {
//Comment
subItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled);
subItem->setTextColor(Qt::gray);
subItem->setForeground(Qt::gray);
} else {
subItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled);
const bool checkState = mDisabledRules.contains(rule);
......
......@@ -89,7 +89,7 @@ void AdBlockBlockableItemsWidget::setAdblockResult(const QVector<AdBlockResult>
item->setData(Type, Element, Script);
break;
}
item->setTextColor(FilterValue, Qt::red);
item->setForeground(FilterValue, Qt::red);
}
mListItems->setShowDefaultText(mListItems->model()->rowCount() == 0);
//TODO read existing list for enable/disable it.
......
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