Make it compiles against master (I need it)

wilder
Montel Laurent 10 years ago
parent 53e1161c4d
commit 219bf48293
  1. 1
      CMakeLists.txt
  2. 4
      autotests/foldertreewidgettest.cpp
  3. 2
      src/filter/autotests/filteractionpipethroughtest.cpp
  4. 2
      src/filter/kmfilteraccountlist.cpp
  5. 4
      src/folder/foldertreeview.cpp
  6. 16
      src/snippets/snippetsmodel.cpp
  7. 1
      src/snippets/snippetsmodel.h

@ -48,6 +48,7 @@ find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiMime ${AKONADIMIME_LIB_VERSION} CONFIG REQUIRED)

@ -58,9 +58,7 @@ using namespace Akonadi;
class FolderTreeWidgetTest : public QObject
{
Q_OBJECT
public:
private slots:
private Q_SLOTS:
void initTestCase()
{
AkonadiTest::checkTestIsIsolated();

@ -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,13 @@ 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,

Loading…
Cancel
Save