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

Remove deprecated method

parent 881fccd4
......@@ -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")
......
......@@ -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.
......
......@@ -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;
......
......@@ -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);
......
......@@ -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))
{
......
......@@ -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()
......
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