summaryrefslogtreecommitdiffstats
path: root/src/recording
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2019-06-15 16:15:14 +0200
committerUwe Klotz <uklotz@mixxx.org>2019-08-09 20:46:59 +0200
commit4ec616ea536ba09ec9c890168bac3918612581c3 (patch)
treebf54e3319161e7bbc9f3522526f17059dc00bb38 /src/recording
parent2e9c17e1e4c360776c5f356fe3893d7a9ba9cc53 (diff)
Update minimum required Qt version to 5.4.0
Diffstat (limited to 'src/recording')
-rw-r--r--src/recording/recordingmanager.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/recording/recordingmanager.cpp b/src/recording/recordingmanager.cpp
index 97221329a3..53a99b4517 100644
--- a/src/recording/recordingmanager.cpp
+++ b/src/recording/recordingmanager.cpp
@@ -5,14 +5,9 @@
#include <QtDebug>
#include <QDebug>
#include <QMessageBox>
-#include <climits>
-
-#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
#include <QStorageInfo>
-#elif not __WINDOWS__
-#include <sys/statvfs.h>
-#endif
+#include <climits>
#include "control/controlproxy.h"
#include "control/controlpushbutton.h"
@@ -100,18 +95,10 @@ qint64 RecordingManager::getFreeSpace() {
// returns the free space on the recording location in bytes
// return -1 if the free space could not be determined
qint64 rv = -1;
-#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QStorageInfo storage(getRecordingDir());
if (storage.isValid()) {
rv = storage.bytesAvailable();
}
-#elif not __WINDOWS__
- struct statvfs stats;
- QByteArray bpath = getRecordingDir().toUtf8();
- const char *path = bpath.data();
- statvfs(path, &stats);
- rv = stats.f_bsize * stats.f_bavail;
-#endif
return rv;
}