Commit dce5251b authored by Alberto Villa's avatar Alberto Villa

Drop support for KDE 4.3.

parent 93331432
......@@ -321,11 +321,7 @@ qt4_add_dbus_adaptor(kdenlive_SRCS org.kdenlive.MainWindow.xml mainwindow.h Main
qt4_add_resources(kdenlive_SRCS widgets/resources.qrc)
kde4_add_executable(kdenlive ${kdenlive_SRCS} ${kdenlive_UI})
if(${KDE_VERSION} VERSION_LESS 4.3.80)
set(KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF2_LIBS})
else(${KDE_VERSION} VERSION_LESS 4.3.80)
set(KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF3_LIBS})
endif(${KDE_VERSION} VERSION_LESS 4.3.80)
set(KNEWSTUFF_LIBS ${KDE4_KNEWSTUFF3_LIBS})
target_link_libraries(kdenlive
${KDE4_KDEUI_LIBS}
......
......@@ -68,22 +68,16 @@ DvdWizardVob::DvdWizardVob(const QString &profile, QWidget *parent) :
m_view.vobs_list->header()->setResizeMode(1, QHeaderView::Custom);
m_view.vobs_list->header()->setResizeMode(2, QHeaderView::Custom);
#if KDE_IS_VERSION(4,2,0)
m_capacityBar = new KCapacityBar(KCapacityBar::DrawTextInline, this);
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(m_capacityBar);
m_view.size_box->setLayout(layout);
#else
m_view.size_box->setHidden(true);
#endif
slotCheckVobList();
}
DvdWizardVob::~DvdWizardVob()
{
#if KDE_IS_VERSION(4,2,0)
delete m_capacityBar;
#endif
}
......@@ -300,7 +294,6 @@ void DvdWizardVob::slotCheckVobList()
if (hasItem && m_view.vobs_list->indexOfTopLevelItem(item) == max - 1) m_view.button_down->setEnabled(false);
else m_view.button_down->setEnabled(hasItem);
#if KDE_IS_VERSION(4,2,0)
qint64 totalSize = 0;
for (int i = 0; i < max; i++) {
item = m_view.vobs_list->topLevelItem(i);
......@@ -310,7 +303,6 @@ void DvdWizardVob::slotCheckVobList()
qint64 maxSize = (qint64) 47000 * 100000;
m_capacityBar->setValue(100 * totalSize / maxSize);
m_capacityBar->setText(KIO::convertSize(totalSize));
#endif
}
void DvdWizardVob::slotItemUp()
......
......@@ -24,11 +24,7 @@
#include "ui_dvdwizardvob_ui.h"
#include <kdeversion.h>
#if KDE_IS_VERSION(4,2,0)
#include <kcapacitybar.h>
#endif
#include <KUrl>
#include <QWizardPage>
......@@ -57,10 +53,7 @@ public:
private:
Ui::DvdWizardVob_UI m_view;
QString m_errorMessage;
#if KDE_IS_VERSION(4,2,0)
KCapacityBar *m_capacityBar;
#endif
public slots:
void slotAddVobFile(KUrl url = KUrl(), const QString &chapters = QString());
......
......@@ -712,9 +712,7 @@ void KdenliveSettingsDialog::updateSettings()
KdenliveSettings::setShuttlebuttons(maps);
#endif
#if KDE_IS_VERSION(4,3,0)
KConfigDialog::settingsChangedSlot();
#endif
//KConfigDialog::updateSettings();
if (resetProfile) emit doResetProfile();
......@@ -801,17 +799,13 @@ void KdenliveSettingsDialog::slotShuttleModified()
QString maps = JogShuttleConfig::actionMap(actions);
m_shuttleModified = KdenliveSettings::shuttlebuttons() != maps;
#endif
#if KDE_IS_VERSION(4,3,0)
KConfigDialog::updateButtons();
#endif
}
void KdenliveSettingsDialog::slotDialogModified()
{
m_modified = true;
#if KDE_IS_VERSION(4,3,0)
KConfigDialog::updateButtons();
#endif
}
//virtual
......
......@@ -92,14 +92,8 @@
#include <KFileItem>
#include <KNotification>
#include <KNotifyConfigWidget>
#if KDE_IS_VERSION(4,3,80)
#include <knewstuff3/downloaddialog.h>
#include <knewstuff3/knewstuffaction.h>
#else
#include <knewstuff2/engine.h>
#include <knewstuff2/ui/knewstuffaction.h>
#define KNS3 KNS
#endif /* KDE_IS_VERSION(4,3,80) */
#include <KToolBar>
#include <KColorScheme>
#include <KProgressDialog>
......@@ -235,9 +229,7 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
connect(m_notesWidget, SIGNAL(seekProject(int)), m_projectMonitor->render, SLOT(seekToFrame(int)));
m_notesWidget->setTabChangesFocus(true);
#if KDE_IS_VERSION(4,4,0)
m_notesWidget->setClickMessage(i18n("Enter your project notes here ..."));
#endif
m_notesDock->setWidget(m_notesWidget);
addDockWidget(Qt::TopDockWidgetArea, m_notesDock);
......@@ -3675,7 +3667,6 @@ void MainWindow::slotResizeItemEnd()
int MainWindow::getNewStuff(const QString &configFile)
{
KNS3::Entry::List entries;
#if KDE_IS_VERSION(4,3,80)
KNS3::DownloadDialog dialog(configFile);
dialog.exec();
entries = dialog.changedEntries();
......@@ -3683,15 +3674,6 @@ int MainWindow::getNewStuff(const QString &configFile)
if (entry.status() == KNS3::Entry::Installed)
kDebug() << "// Installed files: " << entry.installedFiles();
}
#else
KNS::Engine engine(0);
if (engine.init(configFile))
entries = engine.downloadDialogModal(this);
foreach(KNS::Entry * entry, entries) {
if (entry->status() == KNS::Entry::Installed)
kDebug() << "// Installed files: " << entry->installedFiles();
}
#endif /* KDE_IS_VERSION(4,3,80) */
return entries.size();
}
......
......@@ -577,9 +577,7 @@ void Monitor::slotExtractCurrentFrame()
KFileDialog *fs = new KFileDialog(KUrl(), "image/png", this);
fs->setOperationMode(KFileDialog::Saving);
fs->setMode(KFile::File);
#if KDE_IS_VERSION(4,2,0)
fs->setConfirmOverwrite(true);
#endif
fs->setKeepLocation(true);
fs->exec();
QString path = fs->selectedFile();
......
......@@ -36,9 +36,7 @@
#include <KMessageBox>
#include <KApplication>
#if KDE_IS_VERSION(4,2,0)
#include <KDiskFreeSpaceInfo>
#endif
#include <QMouseEvent>
#include <QMenu>
......@@ -112,7 +110,6 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) :
m_logger.setFrame(false);
//m_logger.setInsertPolicy(QComboBox::InsertAtTop);
#if KDE_IS_VERSION(4,2,0)
m_freeSpace = new KCapacityBar(KCapacityBar::DrawTextInline, this);
m_freeSpace->setMaximumWidth(150);
QFontMetricsF fontMetrics(font());
......@@ -122,7 +119,6 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) :
connect(&m_spaceTimer, SIGNAL(timeout()), this, SLOT(slotUpdateFreeSpace()));
m_spaceTimer.setInterval(30000);
m_spaceTimer.setSingleShot(false);
#endif
control_frame_firewire->setLayout(layout);
m_displayProcess = new QProcess;
......@@ -165,9 +161,7 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) :
RecMonitor::~RecMonitor()
{
#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.stop();
#endif
delete m_captureProcess;
delete m_displayProcess;
if (m_captureDevice) delete m_captureDevice;
......@@ -203,10 +197,8 @@ void RecMonitor::slotUpdateCaptureFolder(const QString &currentProjectFolder)
else KMessageBox::information(this, i18n("You need to stop capture before your changes can be applied"), i18n("Capturing"));
} else slotVideoDeviceChanged(device_selector->currentIndex());
#if KDE_IS_VERSION(4,2,0)
// update free space info
slotUpdateFreeSpace();
#endif
}
void RecMonitor::slotVideoDeviceChanged(int ix)
......@@ -539,9 +531,7 @@ void RecMonitor::slotRecord()
m_isCapturing = true;
m_didCapture = true;
m_captureProcess->write("c\n", 3);
#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.start();
#endif
return;
}
if (m_captureProcess->state() == QProcess::NotRunning) {
......@@ -792,12 +782,9 @@ void RecMonitor::slotProcessStatus(QProcess::ProcessState status)
}
m_isCapturing = false;
#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.stop();
// update free space info
slotUpdateFreeSpace();
#endif
} else {
if (device_selector->currentIndex() != SCREENGRAB) m_stopAction->setEnabled(true);
device_selector->setEnabled(false);
......@@ -860,21 +847,17 @@ void RecMonitor::manageCapturedFiles()
// virtual
void RecMonitor::mousePressEvent(QMouseEvent * /*event*/)
{
#if KDE_IS_VERSION(4,2,0)
if (m_freeSpace->underMouse()) slotUpdateFreeSpace();
#endif
}
void RecMonitor::slotUpdateFreeSpace()
{
#if KDE_IS_VERSION(4,2,0)
KDiskFreeSpaceInfo info = KDiskFreeSpaceInfo::freeSpaceInfo(m_capturePath);
if (info.isValid() && info.size() > 0) {
m_freeSpace->setValue(100 * info.used() / info.size());
m_freeSpace->setText(i18n("Free space: %1", KIO::convertSize(info.available())));
m_freeSpace->update();
}
#endif
}
void RecMonitor::refreshRecMonitor(bool visible)
......
......@@ -41,9 +41,7 @@
#include <kdeversion.h>
#include <KComboBox>
#if KDE_IS_VERSION(4,2,0)
#include <kcapacitybar.h>
#endif
class MonitorManager;
class MltDeviceCapture;
......@@ -76,10 +74,8 @@ private:
KComboBox m_logger;
QString m_capturePath;
#if KDE_IS_VERSION(4,2,0)
KCapacityBar *m_freeSpace;
QTimer m_spaceTimer;
#endif
KUrl m_captureFile;
KIcon m_playIcon;
......
......@@ -1800,9 +1800,7 @@ void TitleWidget::saveTitle(KUrl url)
KFileDialog *fs = new KFileDialog(KUrl(m_projectTitlePath), "application/x-kdenlivetitle", this);
fs->setOperationMode(KFileDialog::Saving);
fs->setMode(KFile::File);
#if KDE_IS_VERSION(4,2,0)
fs->setConfirmOverwrite(true);
#endif
fs->setKeepLocation(true);
fs->exec();
url = fs->selectedUrl();
......
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