diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") ecm_install_po_files_as_qm(po) endif() - +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) add_subdirectory(src) if (BUILD_TESTING) add_subdirectory(tests) diff --git a/src/imageconverter.cpp b/src/imageconverter.cpp --- a/src/imageconverter.cpp +++ b/src/imageconverter.cpp @@ -66,7 +66,7 @@ QImage image = _image.convertToFormat(QImage::Format_RGBA8888); - QByteArray data((const char*)image.constBits(), image.byteCount()); + QByteArray data((const char*)image.constBits(), image.sizeInBytes()); SpecImage specImage; specImage.width = image.width(); diff --git a/src/kpassivepopup.cpp b/src/kpassivepopup.cpp --- a/src/kpassivepopup.cpp +++ b/src/kpassivepopup.cpp @@ -287,8 +287,8 @@ delete d->topLayout; d->topLayout = new QVBoxLayout(this); if (d->popupStyle == Balloon) { - const int marginHint = style()->pixelMetric(QStyle::PM_DefaultChildMargin); - d->topLayout->setMargin(2 * marginHint); + const int marginHint = 2 * style()->pixelMetric(QStyle::PM_DefaultChildMargin); + d->topLayout->setContentsMargins(marginHint, marginHint, marginHint, marginHint); } d->topLayout->addWidget(d->msgView); d->topLayout->activate(); diff --git a/src/kstatusnotifieritem.cpp b/src/kstatusnotifieritem.cpp --- a/src/kstatusnotifieritem.cpp +++ b/src/kstatusnotifieritem.cpp @@ -1109,10 +1109,10 @@ icon.width = image.size().width(); icon.height = image.size().height(); if (image.format() == QImage::Format_ARGB32) { - icon.data = QByteArray((char *)image.bits(), image.byteCount()); + icon.data = QByteArray((char *)image.bits(), image.sizeInBytes()); } else { QImage image32 = image.convertToFormat(QImage::Format_ARGB32); - icon.data = QByteArray((char *)image32.bits(), image32.byteCount()); + icon.data = QByteArray((char *)image32.bits(), image32.sizeInBytes()); } //swap to network byte order if we are little endian