summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-03 06:58:20 +0200
committerMontel Laurent <[email protected]>2017-05-03 06:58:20 +0200
commita65dcd7add97a1d0fa923ea444035c6e4721dd2b (patch)
tree2a86424c3f4ea72a2f1938fc10bf69c4dc800f4d
parent881fccd4a1a205ecc660ee0ae4081f0cf2276fde (diff)
Remove deprecated method
-rw-r--r--CMakeLists.txt1
-rw-r--r--autotests/modeltest.cpp14
-rw-r--r--src/incidenceattachment.cpp3
-rw-r--r--src/incidenceattendee.cpp13
-rw-r--r--src/incidencedialog.cpp2
-rw-r--r--src/incidenceresource.cpp10
6 files changed, 23 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 852a42a..1892205 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,7 @@ add_definitions("-DQT_NO_URL_CAST_FROM_STRING")
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}/KF5IncidenceEditor")
diff --git a/autotests/modeltest.cpp b/autotests/modeltest.cpp
index c0ca807..0416000 100644
--- a/autotests/modeltest.cpp
+++ b/autotests/modeltest.cpp
@@ -404,27 +404,27 @@ void ModelTest::data()
// General Purpose roles that should return a QString
QVariant variant = model->data(model->index(0, 0), Qt::ToolTipRole);
if (variant.isValid()) {
- Q_ASSERT(qVariantCanConvert<QString> (variant));
+ Q_ASSERT(variant.canConvert<QString>());
}
variant = model->data(model->index(0, 0), Qt::StatusTipRole);
if (variant.isValid()) {
- Q_ASSERT(qVariantCanConvert<QString> (variant));
+ Q_ASSERT(variant.canConvert<QString>());
}
variant = model->data(model->index(0, 0), Qt::WhatsThisRole);
if (variant.isValid()) {
- Q_ASSERT(qVariantCanConvert<QString> (variant));
+ Q_ASSERT(variant.canConvert<QString>());
}
// General Purpose roles that should return a QSize
variant = model->data(model->index(0, 0), Qt::SizeHintRole);
if (variant.isValid()) {
- Q_ASSERT(qVariantCanConvert<QSize> (variant));
+ Q_ASSERT(variant.canConvert<QSize>());
}
// General Purpose roles that should return a QFont
QVariant fontVariant = model->data(model->index(0, 0), Qt::FontRole);
if (fontVariant.isValid()) {
- Q_ASSERT(qVariantCanConvert<QFont> (fontVariant));
+ Q_ASSERT(fontVariant.canConvert<QFont>());
}
// Check that the alignment is one we know about
@@ -438,12 +438,12 @@ void ModelTest::data()
// General Purpose roles that should return a QColor
QVariant colorVariant = model->data(model->index(0, 0), Qt::BackgroundColorRole);
if (colorVariant.isValid()) {
- Q_ASSERT(qVariantCanConvert<QColor> (colorVariant));
+ Q_ASSERT(colorVariant.canConvert<QColor>());
}
colorVariant = model->data(model->index(0, 0), Qt::TextColorRole);
if (colorVariant.isValid()) {
- Q_ASSERT(qVariantCanConvert<QColor> (colorVariant));
+ Q_ASSERT(colorVariant.canConvert<QColor>());
}
// Check that the "check state" is one we know about.
diff --git a/src/incidenceattachment.cpp b/src/incidenceattachment.cpp
index 4708cb5..0f78107 100644
--- a/src/incidenceattachment.cpp
+++ b/src/incidenceattachment.cpp
@@ -141,7 +141,8 @@ void IncidenceAttachment::addAttachment()
{
AttachmentIconItem *item = new AttachmentIconItem(KCalCore::Attachment::Ptr(), mAttachmentView);
- QWeakPointer<AttachmentEditDialog> dialog(new AttachmentEditDialog(item, mAttachmentView));
+ QSharedPointer<AttachmentEditDialog> d(new AttachmentEditDialog(item, mAttachmentView));
+ QWeakPointer<AttachmentEditDialog> dialog(d);
dialog.data()->setWindowTitle(i18nc("@title", "Add Attachment"));
if (dialog.data()->exec() == QDialog::Rejected) {
delete item;
diff --git a/src/incidenceattendee.cpp b/src/incidenceattendee.cpp
index 82c472d..62d14cb 100644
--- a/src/incidenceattendee.cpp
+++ b/src/incidenceattendee.cpp
@@ -432,8 +432,9 @@ void IncidenceAttendee::expandResult(KJob *job)
void IncidenceAttendee::slotSelectAddresses()
{
- QWeakPointer<Akonadi::EmailAddressSelectionDialog> dialog(
- new Akonadi::EmailAddressSelectionDialog(mParentWidget));
+ QSharedPointer<Akonadi::EmailAddressSelectionDialog> d(new Akonadi::EmailAddressSelectionDialog(mParentWidget));
+
+ QWeakPointer<Akonadi::EmailAddressSelectionDialog> dialog(d);
dialog.data()->view()->view()->setSelectionMode(QAbstractItemView::ExtendedSelection);
if (dialog.data()->exec() == QDialog::Accepted) {
@@ -866,10 +867,10 @@ AttendeeLineEditDelegate *IncidenceAttendee::attendeeDelegate() const
void IncidenceAttendee::filterLayoutChanged()
{
QHeaderView *headerView = mUi->mAttendeeTable->horizontalHeader();
- headerView->setResizeMode(AttendeeTableModel::Role, QHeaderView::ResizeToContents);
- headerView->setResizeMode(AttendeeTableModel::FullName, QHeaderView::Stretch);
- headerView->setResizeMode(AttendeeTableModel::Status, QHeaderView::ResizeToContents);
- headerView->setResizeMode(AttendeeTableModel::Response, QHeaderView::ResizeToContents);
+ headerView->setSectionResizeMode(AttendeeTableModel::Role, QHeaderView::ResizeToContents);
+ headerView->setSectionResizeMode(AttendeeTableModel::FullName, QHeaderView::Stretch);
+ headerView->setSectionResizeMode(AttendeeTableModel::Status, QHeaderView::ResizeToContents);
+ headerView->setSectionResizeMode(AttendeeTableModel::Response, QHeaderView::ResizeToContents);
headerView->setSectionHidden(AttendeeTableModel::CuType, true);
headerView->setSectionHidden(AttendeeTableModel::Name, true);
headerView->setSectionHidden(AttendeeTableModel::Email, true);
diff --git a/src/incidencedialog.cpp b/src/incidencedialog.cpp
index 07cc937..40c8699 100644
--- a/src/incidencedialog.cpp
+++ b/src/incidencedialog.cpp
@@ -670,7 +670,7 @@ void IncidenceDialogPrivate::reject(RejectReason reason, const QString &errorMes
/// IncidenceDialog
IncidenceDialog::IncidenceDialog(Akonadi::IncidenceChanger *changer,
- QWidget *parent, Qt::WFlags flags)
+ QWidget *parent, Qt::WindowFlags flags)
: QDialog(parent, flags),
d_ptr(new IncidenceDialogPrivate(changer, this))
{
diff --git a/src/incidenceresource.cpp b/src/incidenceresource.cpp
index 0949d6e..4e39fbe 100644
--- a/src/incidenceresource.cpp
+++ b/src/incidenceresource.cpp
@@ -167,11 +167,11 @@ void IncidenceResource::layoutChanged()
headerView->setSectionHidden(AttendeeTableModel::CuType, true);
headerView->setSectionHidden(AttendeeTableModel::Name, true);
headerView->setSectionHidden(AttendeeTableModel::Email, true);
- headerView->setResizeMode(AttendeeTableModel::Role, QHeaderView::ResizeToContents);
- headerView->setResizeMode(AttendeeTableModel::FullName, QHeaderView::Stretch);
- headerView->setResizeMode(AttendeeTableModel::Available, QHeaderView::ResizeToContents);
- headerView->setResizeMode(AttendeeTableModel::Status, QHeaderView::ResizeToContents);
- headerView->setResizeMode(AttendeeTableModel::Response, QHeaderView::ResizeToContents);
+ headerView->setSectionResizeMode(AttendeeTableModel::Role, QHeaderView::ResizeToContents);
+ headerView->setSectionResizeMode(AttendeeTableModel::FullName, QHeaderView::Stretch);
+ headerView->setSectionResizeMode(AttendeeTableModel::Available, QHeaderView::ResizeToContents);
+ headerView->setSectionResizeMode(AttendeeTableModel::Status, QHeaderView::ResizeToContents);
+ headerView->setSectionResizeMode(AttendeeTableModel::Response, QHeaderView::ResizeToContents);
}
void IncidenceResource::updateCount()