desktop/bomi/qt5.6.patch

82 lines
3.3 KiB
Diff
Raw Normal View History

2017-03-13 01:21:20 +08:00
From 39ee4c372ffb98a4485b61a11726d39060bb2994 Mon Sep 17 00:00:00 2001
From: Kagami Hiiragi <kagami@genshiken.org>
Date: Mon, 17 Oct 2016 04:04:34 +0300
Subject: [PATCH] Fix compilation for Qt 5.6
See: #458
---
src/bomi/dialog/encoderdialog.cpp | 2 +-
src/bomi/misc/filenamegenerator.cpp | 4 ++--
src/bomi/misc/filenamegenerator.hpp | 2 +-
src/bomi/player/mainwindow_p.cpp | 2 +-
src/bomi/player/mainwindow_p.hpp | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/bomi/dialog/encoderdialog.cpp b/src/bomi/dialog/encoderdialog.cpp
index 970bf7a..f6024cd 100644
--- a/src/bomi/dialog/encoderdialog.cpp
+++ b/src/bomi/dialog/encoderdialog.cpp
@@ -255,7 +255,7 @@ auto EncoderDialog::run() -> QString
{
if (d->size.isEmpty())
return tr("No video stream exists.");
- d->g.unix = QDateTime::currentMSecsSinceEpoch();
+ d->g.unix_ = QDateTime::currentMSecsSinceEpoch();
d->g.dateTime = QDateTime::currentDateTime();
d->g.start = d->ui.a->time();
d->g.end = d->ui.b->time();
diff --git a/src/bomi/misc/filenamegenerator.cpp b/src/bomi/misc/filenamegenerator.cpp
index 3ae0d78..aae2eb4 100644
--- a/src/bomi/misc/filenamegenerator.cpp
+++ b/src/bomi/misc/filenamegenerator.cpp
@@ -51,8 +51,8 @@ auto get(const FileNameGenerator *g, const QString &ph) -> QString
};
get[u"%MEDIA_DISPLAY_NAME%"_q] = [] (const FileNameGenerator *g) { return g->mediaName; };
- get[u"%UNIX%"_q] = [] (const FileNameGenerator *g) { return _N(g->unix / 1000llu); };
- get[u"%UNIX_MS%"_q] = [] (const FileNameGenerator *g) { return _N(g->unix); };
+ get[u"%UNIX%"_q] = [] (const FileNameGenerator *g) { return _N(g->unix_ / 1000llu); };
+ get[u"%UNIX_MS%"_q] = [] (const FileNameGenerator *g) { return _N(g->unix_); };
return get;
}();
auto ret = func.value(ph);
diff --git a/src/bomi/misc/filenamegenerator.hpp b/src/bomi/misc/filenamegenerator.hpp
index dad8601..c527f4e 100644
--- a/src/bomi/misc/filenamegenerator.hpp
+++ b/src/bomi/misc/filenamegenerator.hpp
@@ -11,7 +11,7 @@ struct FileNameGenerator {
QTime start, end;
QString mediaName;
Mrl mrl;
- quint64 unix = 0;
+ quint64 unix_ = 0;
};
#endif // FILENAMEGENERATOR_HPP
diff --git a/src/bomi/player/mainwindow_p.cpp b/src/bomi/player/mainwindow_p.cpp
index 7c2aa8a..75cc9be 100644
--- a/src/bomi/player/mainwindow_p.cpp
+++ b/src/bomi/player/mainwindow_p.cpp
@@ -910,7 +910,7 @@ auto MainWindow::Data::fileNameGenerator(const QTime &end) const -> FileNameGene
g.dateTime = QDateTime::currentDateTime();
g.start = QTime::fromMSecsSinceStartOfDay(e.time());
g.end = end.isNull() ? g.start : end;
- g.unix = QDateTime::currentMSecsSinceEpoch();
+ g.unix_ = QDateTime::currentMSecsSinceEpoch();
g.mrl = e.mrl();
g.mediaName = e.media()->name();
return g;
diff --git a/src/bomi/player/mainwindow_p.hpp b/src/bomi/player/mainwindow_p.hpp
index 7f72589..8311e69 100644
--- a/src/bomi/player/mainwindow_p.hpp
+++ b/src/bomi/player/mainwindow_p.hpp
@@ -101,7 +101,7 @@ struct MainWindow::Data {
struct {
QDate date; QTime time, position;
- quint64 unix = 0;
+ quint64 unix_ = 0;
QMap<QString, std::function<QString(void)>> get;
} ph;
QTimer waiter, hider, dialogWorkaround;