Commit add8a1c1 authored by Laurent Montel's avatar Laurent Montel 😁

Remove some deprecated methods

parent e9089c5a
......@@ -62,6 +62,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX CALENDARSUPPORT
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_definitions( -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT )
#add_definitions( -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 )
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5CalendarSupport")
......
......@@ -99,7 +99,7 @@ void FreePeriodModel::slotNewFreePeriods(const KCalCore::Period::List &freePerio
beginResetModel();
mPeriodList.clear();
mPeriodList = splitPeriodsByDay(freePeriods);
qSort(mPeriodList);
std::sort(mPeriodList.begin(), mPeriodList.end());
endResetModel();
}
......
......@@ -45,10 +45,6 @@ class IncidenceAttachmentModelPrivate
createMonitor();
resetInternalData();
}
QHash<int, QByteArray> roleNames = qq->roleNames();
roleNames.insert(IncidenceAttachmentModel::MimeTypeRole, "mimeType");
roleNames.insert(IncidenceAttachmentModel::AttachmentUrl, "attachmentUrl");
qq->setRoleNames(roleNames);
}
void resetModel()
......@@ -218,4 +214,14 @@ QVariant IncidenceAttachmentModel::headerData(int section,
return QAbstractItemModel::headerData(section, orientation, role);
}
QHash<int, QByteArray> CalendarSupport::IncidenceAttachmentModel::roleNames() const
{
QHash<int, QByteArray> roleNames = QAbstractListModel::roleNames();
roleNames.insert(IncidenceAttachmentModel::MimeTypeRole, "mimeType");
roleNames.insert(IncidenceAttachmentModel::AttachmentUrl, "attachmentUrl");
return roleNames;
}
#include "moc_incidenceattachmentmodel.cpp"
......@@ -72,6 +72,7 @@ public:
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
Q_SIGNALS:
void rowCountChanged();
......@@ -81,7 +82,7 @@ private:
IncidenceAttachmentModelPrivate *const d_ptr;
Q_PRIVATE_SLOT(d_func(), void resetModel())
Q_PRIVATE_SLOT(d_func(), void itemFetched(Akonadi::Item::List))
Q_PRIVATE_SLOT(d_func(), void itemFetched(Akonadi::Item::List))
};
}
......
......@@ -65,6 +65,7 @@
#include <QModelIndex>
#include <QPointer>
#include <QFileDialog>
#include <QUrlQuery>
#include <boost/bind.hpp>
#include "calendarsupport_debug.h"
......
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