Commit 01b61c2f authored by Milian Wolff's avatar Milian Wolff
Browse files

Fix compile when deprecated Qt features are disabled

parent f06ee7b7
......@@ -209,7 +209,7 @@ void FilterActionPipeThroughTest::testXUidUnchange()
filter.argsFromString(QStringLiteral("cat "));
QCOMPARE(filter.process(context, false), FilterAction::GoOn);
QCOMPARE(context.needsPayloadStore(), true);
QCOMPARE(QString::fromAscii(msgPtr->encodedContent()), QString::fromAscii(data));
QCOMPARE(QString::fromLatin1(msgPtr->encodedContent()), QString::fromLatin1(data));
}
void FilterActionPipeThroughTest::testXUidRemoved()
......
......@@ -41,7 +41,7 @@ KMFilterAccountList::KMFilterAccountList(QWidget *parent)
setRootIsDecorated(false);
setSortingEnabled(true);
sortByColumn(0, Qt::AscendingOrder);
header()->setMovable(false);
header()->setSectionsMovable(false);
}
KMFilterAccountList::~KMFilterAccountList()
......
......@@ -238,14 +238,14 @@ void FolderTreeView::setSortingPolicy(FolderTreeWidget::SortingPolicy policy, bo
mSortingPolicy = policy;
switch (mSortingPolicy) {
case FolderTreeWidget::SortByCurrentColumn:
header()->setClickable(true);
header()->setSectionsClickable(true);
header()->setSortIndicatorShown(true);
setSortingEnabled(true);
Q_EMIT manualSortingChanged(false);
break;
case FolderTreeWidget::SortByDragAndDropKey:
header()->setClickable(false);
header()->setSectionsClickable(false);
header()->setSortIndicatorShown(false);
setSortingEnabled(false); // hack for qutie bug: this call shouldn't be here at all
......
......@@ -148,12 +148,6 @@ SnippetsModel::SnippetsModel(QObject *parent)
: QAbstractItemModel(parent)
{
mRootItem = new SnippetItem(true);
QHash<int, QByteArray> names = roleNames();
names.insert(IsGroupRole, "isSnippetGroup");
setRoleNames(names);
}
SnippetsModel::~SnippetsModel()
......@@ -443,3 +437,12 @@ Qt::DropActions SnippetsModel::supportedDropActions() const
return Qt::CopyAction | Qt::MoveAction;
}
QHash<int, QByteArray> SnippetsModel::roleNames() const
{
static QHash<int, QByteArray> names;
if (names.isEmpty()) {
names.insert(IsGroupRole, QByteArrayLiteral("isSnippetGroup"));
}
return names;
}
......@@ -66,6 +66,7 @@ public:
int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
protected:
bool insertRows(int row, int count,
......
Supports Markdown
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