Remove more kde4support stuff

parent ba0764e5
...@@ -100,7 +100,6 @@ list(APPEND kdenlive_SRCS ...@@ -100,7 +100,6 @@ list(APPEND kdenlive_SRCS
layoutmanagement.cpp layoutmanagement.cpp
hidetitlebars.cpp hidetitlebars.cpp
mltconnection.cpp mltconnection.cpp
core.cpp core.cpp
) )
...@@ -245,14 +244,6 @@ target_link_libraries(kdenlive ...@@ -245,14 +244,6 @@ target_link_libraries(kdenlive
KF5::Notifications KF5::Notifications
KF5::TextWidgets KF5::TextWidgets
KF5::IconThemes KF5::IconThemes
#KF5::Service
#KF5::KIONTLM
#${KDE4_KDEUI_LIBS}
#${KDE4_KIO_LIBS}
#${KDE4_KNEWSTUFF_LIBS}
#${KDE4_KNOTIFYCONFIG_LIBRARY}
#${KDE4_KROSSUI_LIBS}
#${KDE4_SOLID_LIBS}
${Qt5_LIBRARIES} ${Qt5_LIBRARIES}
Qt5::Svg Qt5::Svg
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
......
...@@ -29,7 +29,7 @@ class MonitorManager; ...@@ -29,7 +29,7 @@ class MonitorManager;
* Plugins should be loaded after the widget setup. * Plugins should be loaded after the widget setup.
*/ */
class KDENLIVECORE_EXPORT Core : public QObject class /*KDENLIVECORE_EXPORT*/ Core : public QObject
{ {
Q_OBJECT Q_OBJECT
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#endif #endif
#include "klocalizedstring.h" #include "klocalizedstring.h"
#include <kde_file.h>
#include <kdeversion.h>
#include <KMessageBox> #include <KMessageBox>
#include <KLineEdit> #include <KLineEdit>
#include <QDebug> #include <QDebug>
......
...@@ -198,13 +198,11 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, const ...@@ -198,13 +198,11 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, const
m_view.errorIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(height, height)); m_view.errorIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(height, height));
m_view.errorBox->setHidden(true); m_view.errorBox->setHidden(true);
#if KDE_IS_VERSION(4,7,0)
m_infoMessage = new KMessageWidget; m_infoMessage = new KMessageWidget;
QGridLayout *s = static_cast <QGridLayout*> (m_view.tab->layout()); QGridLayout *s = static_cast <QGridLayout*> (m_view.tab->layout());
s->addWidget(m_infoMessage, 16, 0, 1, -1); s->addWidget(m_infoMessage, 16, 0, 1, -1);
m_infoMessage->setCloseButtonVisible(false); m_infoMessage->setCloseButtonVisible(false);
m_infoMessage->hide(); m_infoMessage->hide();
#endif
m_view.encoder_threads->setMaximum(QThread::idealThreadCount()); m_view.encoder_threads->setMaximum(QThread::idealThreadCount());
m_view.encoder_threads->setValue(KdenliveSettings::encodethreads()); m_view.encoder_threads->setValue(KdenliveSettings::encodethreads());
...@@ -328,9 +326,7 @@ RenderWidget::~RenderWidget() ...@@ -328,9 +326,7 @@ RenderWidget::~RenderWidget()
m_view.scripts_list->clear(); m_view.scripts_list->clear();
delete m_jobsDelegate; delete m_jobsDelegate;
delete m_scriptsDelegate; delete m_scriptsDelegate;
#if KDE_IS_VERSION(4,7,0)
delete m_infoMessage; delete m_infoMessage;
#endif
} }
void RenderWidget::slotEditItem(QListWidgetItem *item) void RenderWidget::slotEditItem(QListWidgetItem *item)
...@@ -2256,37 +2252,17 @@ void RenderWidget::missingClips(bool hasMissing) ...@@ -2256,37 +2252,17 @@ void RenderWidget::missingClips(bool hasMissing)
void RenderWidget::errorMessage(const QString &message) void RenderWidget::errorMessage(const QString &message)
{ {
if (!message.isEmpty()) { if (!message.isEmpty()) {
#if KDE_IS_VERSION(4,7,0)
m_infoMessage->setMessageType(KMessageWidget::Warning); m_infoMessage->setMessageType(KMessageWidget::Warning);
m_infoMessage->setText(message); m_infoMessage->setText(message);
#if KDE_IS_VERSION(4,10,0)
m_infoMessage->animatedShow(); m_infoMessage->animatedShow();
#else
// Workaround KDE bug in KMessageWidget
QTimer::singleShot(0, m_infoMessage, SLOT(animatedShow()));
#endif
#else
m_view.errorLabel->setText(message);
m_view.errorBox->setHidden(false);
#endif
} }
else { else {
#if KDE_IS_VERSION(4,7,0)
if (m_view.tabWidget->currentIndex() == 0 && m_infoMessage->isVisible()) { if (m_view.tabWidget->currentIndex() == 0 && m_infoMessage->isVisible()) {
#if KDE_IS_VERSION(4,10,0)
m_infoMessage->animatedHide(); m_infoMessage->animatedHide();
#else
QTimer::singleShot(0, m_infoMessage, SLOT(animatedHide()));
#endif
} else { } else {
// Seems like animated hide does not work when page is not visible // Seems like animated hide does not work when page is not visible
m_infoMessage->hide(); m_infoMessage->hide();
} }
#else
m_view.errorBox->setHidden(true);
m_view.errorLabel->setText(QString());
#endif
} }
} }
......
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
#ifndef RENDERWIDGET_H #ifndef RENDERWIDGET_H
#define RENDERWIDGET_H #define RENDERWIDGET_H
#include <kdeversion.h>
#if KDE_IS_VERSION(4,7,0)
#include <KMessageWidget> #include <KMessageWidget>
#endif
#include <QPushButton> #include <QPushButton>
#include <QPainter> #include <QPainter>
...@@ -190,10 +187,7 @@ private: ...@@ -190,10 +187,7 @@ private:
RenderViewDelegate *m_jobsDelegate; RenderViewDelegate *m_jobsDelegate;
bool m_blockProcessing; bool m_blockProcessing;
QString m_renderer; QString m_renderer;
#if KDE_IS_VERSION(4,7,0)
KMessageWidget *m_infoMessage; KMessageWidget *m_infoMessage;
#endif
void parseProfiles(const QString &meta = QString(), const QString &group = QString(), const QString &profile = QString()); void parseProfiles(const QString &meta = QString(), const QString &group = QString(), const QString &profile = QString());
void parseFile(const QString &exportFile, bool editable); void parseFile(const QString &exportFile, bool editable);
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <mlt++/Mlt.h> #include <mlt++/Mlt.h>
#include <QDebug> #include <QDebug>
#include <klocale.h> #include <klocalizedstring.h>
#include <kfileitem.h> #include <kfileitem.h>
#include <kmessagebox.h> #include <kmessagebox.h>
...@@ -363,7 +363,6 @@ void KThumb::slotCreateAudioThumbs() ...@@ -363,7 +363,6 @@ void KThumb::slotCreateAudioThumbs()
m_clipManager->askForAudioThumb(m_id); m_clipManager->askForAudioThumb(m_id);
} }
#if KDE_IS_VERSION(4,5,0)
void KThumb::queryIntraThumbs(const QSet <int> &missingFrames) void KThumb::queryIntraThumbs(const QSet <int> &missingFrames)
{ {
m_intraMutex.lock(); m_intraMutex.lock();
...@@ -426,7 +425,6 @@ QImage KThumb::findCachedThumb(int pos) ...@@ -426,7 +425,6 @@ QImage KThumb::findCachedThumb(int pos)
m_clipManager->pixmapCache->findImage(path, &img); m_clipManager->pixmapCache->findImage(path, &img);
return img; return img;
} }
#endif
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include <QFuture> #include <QFuture>
#include <QUrl> #include <QUrl>
#include <kdeversion.h>
#include <mlt++/Mlt.h> #include <mlt++/Mlt.h>
...@@ -60,12 +58,10 @@ public: ...@@ -60,12 +58,10 @@ public:
void updateThumbUrl(const QString &hash); void updateThumbUrl(const QString &hash);
void extractImage(const QList<int> &frames); void extractImage(const QList<int> &frames);
QImage extractImage(int frame, int width, int height); QImage extractImage(int frame, int width, int height);
#if KDE_IS_VERSION(4,5,0)
/** @brief Request thumbnails for the frame range. */ /** @brief Request thumbnails for the frame range. */
void queryIntraThumbs(const QSet <int> &missingFrames); void queryIntraThumbs(const QSet <int> &missingFrames);
/** @brief Query cached thumbnail. */ /** @brief Query cached thumbnail. */
QImage findCachedThumb(int pos); QImage findCachedThumb(int pos);
#endif
void getThumb(int frame); void getThumb(int frame);
void getGenericThumb(int frame, int height, int type); void getGenericThumb(int frame, int height, int type);
...@@ -87,10 +83,8 @@ public: ...@@ -87,10 +83,8 @@ public:
static uint imageVariance(const QImage &image); static uint imageVariance(const QImage &image);
private slots: private slots:
#if KDE_IS_VERSION(4,5,0)
/** @brief Fetch all requested frames. */ /** @brief Fetch all requested frames. */
void slotGetIntraThumbs(); void slotGetIntraThumbs();
#endif
private: private:
QUrl m_url; QUrl m_url;
......
...@@ -87,12 +87,10 @@ DvdWizard::DvdWizard(MonitorManager *manager, const QString &url, QWidget *paren ...@@ -87,12 +87,10 @@ DvdWizard::DvdWizard(MonitorManager *manager, const QString &url, QWidget *paren
m_status.iso_image->setFilter("*.iso"); m_status.iso_image->setFilter("*.iso");
m_status.iso_image->setMode(KFile::File); m_status.iso_image->setMode(KFile::File);
#if KDE_IS_VERSION(4,7,0)
m_isoMessage = new KMessageWidget; m_isoMessage = new KMessageWidget;
QGridLayout *s = static_cast <QGridLayout*> (page4->layout()); QGridLayout *s = static_cast <QGridLayout*> (page4->layout());
s->addWidget(m_isoMessage, 5, 0, 1, -1); s->addWidget(m_isoMessage, 5, 0, 1, -1);
m_isoMessage->hide(); m_isoMessage->hide();
#endif
addPage(page4); addPage(page4);
...@@ -181,9 +179,7 @@ void DvdWizard::slotprepareMonitor() ...@@ -181,9 +179,7 @@ void DvdWizard::slotprepareMonitor()
void DvdWizard::generateDvd() void DvdWizard::generateDvd()
{ {
#if KDE_IS_VERSION(4,7,0)
m_isoMessage->animatedHide(); m_isoMessage->animatedHide();
#endif
m_status.error_box->setHidden(true); m_status.error_box->setHidden(true);
m_status.error_box->setCurrentIndex(0); m_status.error_box->setCurrentIndex(0);
m_status.menu_file->clear(); m_status.menu_file->clear();
...@@ -338,15 +334,9 @@ void DvdWizard::processSpumux() ...@@ -338,15 +334,9 @@ void DvdWizard::processSpumux()
QProcess spumux; QProcess spumux;
QString menuMovieUrl; QString menuMovieUrl;
#if QT_VERSION >= 0x040600
QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("VIDEO_FORMAT", m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC"); env.insert("VIDEO_FORMAT", m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC");
spumux.setProcessEnvironment(env); spumux.setProcessEnvironment(env);
#else
QStringList env = QProcess::systemEnvironment();
env << QString("VIDEO_FORMAT=") + QString(m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC");
spumux.setEnvironment(env);
#endif
if (m_pageMenu->menuMovie()) spumux.setStandardInputFile(m_menuFinalVideo.fileName()); if (m_pageMenu->menuMovie()) spumux.setStandardInputFile(m_menuFinalVideo.fileName());
else spumux.setStandardInputFile(m_menuVideo.fileName()); else spumux.setStandardInputFile(m_menuVideo.fileName());
...@@ -654,15 +644,9 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap <QStrin ...@@ -654,15 +644,9 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap <QStrin
m_creationLog.clear(); m_creationLog.clear();
m_dvdauthor = new QProcess(this); m_dvdauthor = new QProcess(this);
// Set VIDEO_FORMAT variable (required by dvdauthor 0.7) // Set VIDEO_FORMAT variable (required by dvdauthor 0.7)
#if QT_VERSION >= 0x040600
QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("VIDEO_FORMAT", m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC"); env.insert("VIDEO_FORMAT", m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC");
m_dvdauthor->setProcessEnvironment(env); m_dvdauthor->setProcessEnvironment(env);
#else
QStringList env = QProcess::systemEnvironment();
env << QString("VIDEO_FORMAT=") + QString(m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC");
m_dvdauthor->setEnvironment(env);
#endif
connect(m_dvdauthor, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotRenderFinished(int,QProcess::ExitStatus))); connect(m_dvdauthor, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotRenderFinished(int,QProcess::ExitStatus)));
connect(m_dvdauthor, SIGNAL(readyReadStandardOutput()), this, SLOT(slotShowRenderInfo())); connect(m_dvdauthor, SIGNAL(readyReadStandardOutput()), this, SLOT(slotShowRenderInfo()));
m_dvdauthor->setProcessChannelMode(QProcess::MergedChannels); m_dvdauthor->setProcessChannelMode(QProcess::MergedChannels);
...@@ -696,19 +680,15 @@ void DvdWizard::slotShowRenderInfo() ...@@ -696,19 +680,15 @@ void DvdWizard::slotShowRenderInfo()
} }
void DvdWizard::errorMessage(const QString &text) { void DvdWizard::errorMessage(const QString &text) {
#if KDE_IS_VERSION(4,7,0)
m_isoMessage->setText(text); m_isoMessage->setText(text);
m_isoMessage->setMessageType(KMessageWidget::Error); m_isoMessage->setMessageType(KMessageWidget::Error);
m_isoMessage->animatedShow(); m_isoMessage->animatedShow();
#endif
} }
void DvdWizard::infoMessage(const QString &text) { void DvdWizard::infoMessage(const QString &text) {
#if KDE_IS_VERSION(4,7,0)
m_isoMessage->setText(text); m_isoMessage->setText(text);
m_isoMessage->setMessageType(KMessageWidget::Positive); m_isoMessage->setMessageType(KMessageWidget::Positive);
m_isoMessage->animatedShow(); m_isoMessage->animatedShow();
#endif
} }
void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status) void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
......
...@@ -47,10 +47,7 @@ private: ...@@ -47,10 +47,7 @@ private:
DvdWizardVob *m_pageVob; DvdWizardVob *m_pageVob;
DvdWizardMenu *m_pageMenu; DvdWizardMenu *m_pageMenu;
Ui::DvdWizardStatus_UI m_status; Ui::DvdWizardStatus_UI m_status;
#if KDE_IS_VERSION(4,7,0)
KMessageWidget *m_isoMessage; KMessageWidget *m_isoMessage;
#endif
DvdWizardChapters *m_pageChapters; DvdWizardChapters *m_pageChapters;
QTemporaryFile m_authorFile; QTemporaryFile m_authorFile;
......
...@@ -86,7 +86,6 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) : ...@@ -86,7 +86,6 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) :
QFont font = m_view.font_family->currentFont(); QFont font = m_view.font_family->currentFont();
font.setPixelSize(m_view.font_size->value()); font.setPixelSize(m_view.font_size->value());
//font.setStyleStrategy(QFont::NoAntialias); //font.setStyleStrategy(QFont::NoAntialias);
#if KDE_IS_VERSION(4,6,0)
if (m_view.use_shadow->isChecked()) { if (m_view.use_shadow->isChecked()) {
QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect(this); QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect(this);
shadow->setBlurRadius(7); shadow->setBlurRadius(7);
...@@ -94,9 +93,6 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) : ...@@ -94,9 +93,6 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) :
button->setGraphicsEffect(shadow); button->setGraphicsEffect(shadow);
} }
connect(m_view.use_shadow, SIGNAL(stateChanged(int)), this, SLOT(slotEnableShadows(int))); connect(m_view.use_shadow, SIGNAL(stateChanged(int)), this, SLOT(slotEnableShadows(int)));
#elif KDE_IS_VERSION(4,6,0)
m_view.use_shadow->setHidden(true);
#endif
button->setFont(font); button->setFont(font);
button->setDefaultTextColor(m_view.text_color->color()); button->setDefaultTextColor(m_view.text_color->color());
button->setZValue(4); button->setZValue(4);
...@@ -135,14 +131,11 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) : ...@@ -135,14 +131,11 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) :
m_view.error_message->setPalette(p); m_view.error_message->setPalette(p);
m_view.menu_box->setEnabled(false); m_view.menu_box->setEnabled(false);
#if KDE_IS_VERSION(4,7,0)
m_menuMessage = new KMessageWidget; m_menuMessage = new KMessageWidget;
QGridLayout *s = static_cast <QGridLayout*> (layout()); QGridLayout *s = static_cast <QGridLayout*> (layout());
s->addWidget(m_menuMessage, 7, 0, 1, -1); s->addWidget(m_menuMessage, 7, 0, 1, -1);
m_menuMessage->hide(); m_menuMessage->hide();
m_view.error_message->hide(); m_view.error_message->hide();
#endif
} }
DvdWizardMenu::~DvdWizardMenu() DvdWizardMenu::~DvdWizardMenu()
...@@ -155,7 +148,6 @@ DvdWizardMenu::~DvdWizardMenu() ...@@ -155,7 +148,6 @@ DvdWizardMenu::~DvdWizardMenu()
void DvdWizardMenu::slotEnableShadows(int enable) void DvdWizardMenu::slotEnableShadows(int enable)
{ {
#if KDE_IS_VERSION(4,6,0)
QList<QGraphicsItem *> list = m_scene->items(); QList<QGraphicsItem *> list = m_scene->items();
for (int i = 0; i < list.count(); ++i) { for (int i = 0; i < list.count(); ++i) {
if (list.at(i)->type() == DvdButtonItem) { if (list.at(i)->type() == DvdButtonItem) {
...@@ -168,7 +160,6 @@ void DvdWizardMenu::slotEnableShadows(int enable) ...@@ -168,7 +160,6 @@ void DvdWizardMenu::slotEnableShadows(int enable)
else list.at(i)->setGraphicsEffect(NULL); else list.at(i)->setGraphicsEffect(NULL);
} }
} }
#endif
} }
// virtual // virtual
...@@ -188,14 +179,9 @@ bool DvdWizardMenu::isComplete() const ...@@ -188,14 +179,9 @@ bool DvdWizardMenu::isComplete() const
if (!collisions.isEmpty()) { if (!collisions.isEmpty()) {
for (int j = 0; j < collisions.count(); ++j) { for (int j = 0; j < collisions.count(); ++j) {
if (collisions.at(j)->type() == button->type()) { if (collisions.at(j)->type() == button->type()) {
#if KDE_IS_VERSION(4,7,0)
m_menuMessage->setText(i18n("Buttons overlapping")); m_menuMessage->setText(i18n("Buttons overlapping"));
m_menuMessage->setMessageType(KMessageWidget::Warning); m_menuMessage->setMessageType(KMessageWidget::Warning);
m_menuMessage->show(); m_menuMessage->show();
#else
m_view.error_message->setText(i18n("Buttons overlapping"));
m_view.error_message->setHidden(false);
#endif
return false; return false;
} }
} }
...@@ -205,35 +191,24 @@ bool DvdWizardMenu::isComplete() const ...@@ -205,35 +191,24 @@ bool DvdWizardMenu::isComplete() const
} }
if (buttonCount == 0) { if (buttonCount == 0) {
//We need at least one button //We need at least one button
#if KDE_IS_VERSION(4,7,0)
m_menuMessage->setText(i18n("No button in menu")); m_menuMessage->setText(i18n("No button in menu"));
m_menuMessage->setMessageType(KMessageWidget::Warning); m_menuMessage->setMessageType(KMessageWidget::Warning);
m_menuMessage->show(); m_menuMessage->show();
#else
m_view.error_message->setText(i18n("No button in menu"));
m_view.error_message->setHidden(false);
#endif
return false; return false;
} }
if (!m_view.background_image->isHidden()) { if (!m_view.background_image->isHidden()) {
// Make sure user selected a valid image / video file // Make sure user selected a valid image / video file
if (!QFile::exists(m_view.background_image->url().path())) { if (!QFile::exists(m_view.background_image->url().path())) {
#if KDE_IS_VERSION(4,7,0)
m_menuMessage->setText(i18n("Missing background image")); m_menuMessage->setText(i18n("Missing background image"));
m_menuMessage->setMessageType(KMessageWidget::Warning); m_menuMessage->setMessageType(KMessageWidget::Warning);
m_menuMessage->show(); m_menuMessage->show();
#else
m_view.error_message->setText(i18n("Missing background image"));
m_view.error_message->setHidden(false);
#endif
return false; return false;
} }
} }
#if KDE_IS_VERSION(4,7,0)
m_menuMessage->hide(); m_menuMessage->hide();
#endif
// check that we have a "Play all" entry // check that we have a "Play all" entry
if (targets.contains(0)) return true; if (targets.contains(0)) return true;
...@@ -241,14 +216,9 @@ bool DvdWizardMenu::isComplete() const ...@@ -241,14 +216,9 @@ bool DvdWizardMenu::isComplete() const
for (int i = m_view.target_list->count() - 1; i > 0; --i) { for (int i = m_view.target_list->count() - 1; i > 0; --i) {
// If there is a vob file entry and it has no button assigned, don't allow to go further // If there is a vob file entry and it has no button assigned, don't allow to go further
if (m_view.target_list->itemIcon(i).isNull() == false && !targets.contains(i)) { if (m_view.target_list->itemIcon(i).isNull() == false && !targets.contains(i)) {
#if KDE_IS_VERSION(4,7,0)
m_menuMessage->setText(i18n("No menu entry for %1", m_view.target_list->itemText(i))); m_menuMessage->setText(i18n("No menu entry for %1", m_view.target_list->itemText(i)));
m_menuMessage->setMessageType(KMessageWidget::Warning); m_menuMessage->setMessageType(KMessageWidget::Warning);
m_menuMessage->show(); m_menuMessage->show();
#else
m_view.error_message->setText(i18n("No menu entry for %1", m_view.target_list->itemText(i)));
m_view.error_message->setHidden(false);
#endif
return false; return false;
} }
} }
...@@ -318,14 +288,12 @@ void DvdWizardMenu::addButton() ...@@ -318,14 +288,12 @@ void DvdWizardMenu::addButton()
DvdButton *button = new DvdButton(m_view.play_text->text()); DvdButton *button = new DvdButton(m_view.play_text->text());
QFont font = m_view.font_family->currentFont(); QFont font = m_view.font_family->currentFont();
font.setPixelSize(m_view.font_size->value()); font.setPixelSize(m_view.font_size->value());
#if KDE_IS_VERSION(4,6,0)
if (m_view.use_shadow->isChecked()) { if (m_view.use_shadow->isChecked()) {
QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect(this); QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect(this);
shadow->setBlurRadius(7); shadow->setBlurRadius(7);
shadow->setOffset(4, 4); shadow->setOffset(4, 4);
button->setGraphicsEffect(shadow); button->setGraphicsEffect(shadow);
} }
#endif
//font.setStyleStrategy(QFont::NoAntialias); //font.setStyleStrategy(QFont::NoAntialias);
button->setFont(font); button->setFont(font);
button->setDefaultTextColor(m_view.text_color->color()); button->setDefaultTextColor(m_view.text_color->color());
...@@ -579,48 +547,29 @@ void DvdWizardMenu::createButtonImages(const QString &selected_image, const QStr ...@@ -579,48 +547,29 @@ void DvdWizardMenu::createButtonImages(const QString &selected_image, const QStr
if (m_color->scene() != 0) m_scene->removeItem(m_color); if (m_color->scene() != 0) m_scene->removeItem(m_color);
if (m_background->scene() != 0) m_scene->removeItem(m_background); if (m_background->scene() != 0) m_scene->removeItem(m_background);
prepareUnderLines(); prepareUnderLines();
#if QT_VERSION >= 0x040800
QImage img(m_finalSize.width(), m_finalSize.height(), QImage::Format_ARGB32); QImage img(m_finalSize.width(), m_finalSize.height(), QImage::Format_ARGB32);
img.fill(Qt::transparent); img.fill(Qt::transparent);
updateUnderlineColor(m_view.highlighted_color->color()); updateUnderlineColor(m_view.highlighted_color->color());
#else
QImage img(m_finalSize.width(), m_finalSize.height(), QImage::Format_Mono);
img.fill(Qt::white);
updateUnderlineColor(Qt::black);