Fix includes.
This commit is contained in:
parent
437bebf9a6
commit
84a84fd57d
|
@ -1,24 +1,39 @@
|
|||
#include "src/Backends/MPV/MPVBackend.hpp"
|
||||
#include "src/utils.hpp"
|
||||
#include <QApplication>
|
||||
#include <QElapsedTimer>
|
||||
#include <QOpenGLContext>
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickWindow>
|
||||
#include <QSequentialIterable>
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <mpv/render_gl.h>
|
||||
#include <qbytearray.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qguiapplication.h> // IWYU pragma: keep
|
||||
#include <qcoreevent.h>
|
||||
#include <qdebug.h>
|
||||
#include <qicon.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qobject.h>
|
||||
#include <qopenglcontext.h>
|
||||
#include <qopenglframebufferobject.h>
|
||||
#include <qquickwindow.h>
|
||||
#include <stdio.h>
|
||||
#include <clocale>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
#include <mpv/qthelper.hpp>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <QX11Info>
|
||||
#include <QtX11Extras/QX11Info>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#include "src/Backends/MPVCommon/MPVCommon.hpp"
|
||||
#include "src/utils.hpp"
|
||||
class QQuickItem;
|
||||
class QSize;
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#ifdef ENABLE_X11
|
||||
#include <QX11Info> // IWYU pragma: keep
|
||||
#include <QtX11Extras/QX11Info> // IWYU pragma: keep
|
||||
#include <qx11info_x11.h> // IWYU pragma: keep
|
||||
#include <X11/Xlib.h> // IWYU pragma: keep
|
||||
#include <X11/Xutil.h> // IWYU pragma: keep
|
||||
#endif
|
||||
#include <qpa/qplatformnativeinterface.h> // IWYU pragma: keep
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
bool usedirect = false;
|
||||
|
@ -84,11 +99,14 @@ public:
|
|||
{ MPV_RENDER_PARAM_INVALID, nullptr },
|
||||
{ MPV_RENDER_PARAM_INVALID, nullptr }
|
||||
};
|
||||
#if defined(__linux__) || defined(__FREEBSD__)
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#ifdef ENABLE_X11
|
||||
if (QGuiApplication::platformName().contains("xcb")) {
|
||||
params[2].type = MPV_RENDER_PARAM_X11_DISPLAY;
|
||||
params[2].data = QX11Info::display();
|
||||
} else if (QGuiApplication::platformName().contains("wayland")) {
|
||||
}
|
||||
#endif
|
||||
if (QGuiApplication::platformName().contains("wayland")) {
|
||||
params[2].type = MPV_RENDER_PARAM_WL_DISPLAY;
|
||||
auto *native = QGuiApplication::platformNativeInterface();
|
||||
params[2].data = native->nativeResourceForWindow("display", NULL);
|
||||
|
|
|
@ -3,19 +3,18 @@
|
|||
|
||||
#include <mpv/client.h>
|
||||
#include <mpv/opengl_cb.h>
|
||||
#include <mpv/qthelper.hpp>
|
||||
#include <mpv/render_gl.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QOpenGLContext>
|
||||
#include <QQuickFramebufferObject>
|
||||
#include <QSettings>
|
||||
|
||||
#include <mpv/render.h>
|
||||
#include <qmetatype.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qquickframebufferobject.h>
|
||||
#include <qsettings.h>
|
||||
#include <qstring.h>
|
||||
#include <qvariant.h>
|
||||
#include "src/backendinterface.hpp"
|
||||
#include "src/enums.hpp"
|
||||
#include "src/utils.hpp"
|
||||
|
||||
class MpvRenderer;
|
||||
class QEvent;
|
||||
class QObject;
|
||||
class QQuickItem;
|
||||
|
||||
class MPVBackend
|
||||
: public QQuickFramebufferObject
|
||||
|
|
|
@ -1,9 +1,24 @@
|
|||
#include "src/Backends/MPVCommon/MPVCommon.hpp"
|
||||
#include "src/utils.hpp"
|
||||
#include <QSettings>
|
||||
#include <mpv/qthelper.hpp>
|
||||
#include <qbytearray.h>
|
||||
#include <qcbormap.h> // IWYU pragma: keep
|
||||
#include <qcoreapplication.h>
|
||||
#include <qglobal.h>
|
||||
#include <qjsonarray.h> // IWYU pragma: keep
|
||||
#include <qjsonobject.h> // IWYU pragma: keep
|
||||
#include <qlist.h>
|
||||
#include <qlocale.h>
|
||||
#include <qmap.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qsettings.h>
|
||||
#include <spdlog/fmt/fmt.h>
|
||||
#include <string.h>
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
#include "spdlog/logger.h"
|
||||
#include "src/backendinterface.hpp"
|
||||
#include "src/logger.h"
|
||||
|
||||
#include "src/utils.hpp"
|
||||
|
||||
auto mpvLogger = initLogger("mpv");
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
#ifndef MPVCommon_H
|
||||
#define MPVCommon_H
|
||||
|
||||
#include <QString>
|
||||
#include "src/backendinterface.hpp"
|
||||
#include <mpv/client.h>
|
||||
#include <qmetatype.h>
|
||||
#include <qstring.h>
|
||||
#include <qvariant.h>
|
||||
#include "src/enums.hpp"
|
||||
class BackendInterface;
|
||||
class QMetaMethod;
|
||||
|
||||
|
||||
namespace MPVCommon {
|
||||
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
#include <clocale>
|
||||
#include <stdbool.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "src/Backends/MPVNoFBO/MPVNoFBOBackend.hpp"
|
||||
|
||||
#include "src/utils.hpp"
|
||||
#include <QApplication>
|
||||
#include <QMainWindow>
|
||||
#include <QOpenGLContext>
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <QQuickWindow>
|
||||
|
||||
#include <QSequentialIterable>
|
||||
#include <math.h>
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <qapplication.h>
|
||||
#include <qbytearray.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qcoreevent.h>
|
||||
#include <qdebug.h>
|
||||
#include <qicon.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qopenglcontext.h>
|
||||
#include <qquickwindow.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <clocale>
|
||||
#include <mpv/qthelper.hpp>
|
||||
#include <stdexcept>
|
||||
#include "src/Backends/MPVCommon/MPVCommon.hpp"
|
||||
#include "src/utils.hpp"
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -3,17 +3,21 @@
|
|||
|
||||
#include <mpv/client.h>
|
||||
#include <mpv/opengl_cb.h>
|
||||
#include <mpv/qthelper.hpp>
|
||||
|
||||
#include <QObject>
|
||||
#include <QOpenGLContext>
|
||||
#include <QQuickFramebufferObject>
|
||||
#include <QSettings>
|
||||
#include <QWidget>
|
||||
|
||||
#include <qevent.h> // IWYU pragma: keep
|
||||
#include <qmetatype.h>
|
||||
#include <qobject.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qquickitem.h>
|
||||
#include <qquickwindow.h> // IWYU pragma: keep
|
||||
#include <qsettings.h>
|
||||
#include <qsize.h>
|
||||
#include <qstring.h>
|
||||
#include <qvariant.h>
|
||||
#include "src/backendinterface.hpp"
|
||||
#include "src/enums.hpp"
|
||||
|
||||
class QEvent; // IWYU pragma: keep
|
||||
|
||||
class MPVNoFBORenderer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -85,7 +89,6 @@ public slots:
|
|||
// Just used for adding missing audio devices to list.
|
||||
QVariantMap getAudioDevices(const QVariant& drivers) const;
|
||||
|
||||
|
||||
bool event(QEvent* event);
|
||||
|
||||
signals:
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include "Process.h"
|
||||
#include <qstringlist.h>
|
||||
#include <qvariant.h>
|
||||
class QObject;
|
||||
|
||||
Process::Process(QObject* parent)
|
||||
: QProcess(parent)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include <QProcess>
|
||||
#include <QVariant>
|
||||
#include <qmetatype.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qprocess.h>
|
||||
#include <qstring.h>
|
||||
class QObject;
|
||||
|
||||
class Process : public QProcess
|
||||
{
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
#include "ThumbnailCache.h"
|
||||
#include <QCryptographicHash>
|
||||
#include <QImageReader>
|
||||
#include <qbuffer.h>
|
||||
#include <qbytearray.h>
|
||||
#include <qcryptographichash.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qimage.h>
|
||||
#include <qimagereader.h>
|
||||
#include <qiodevice.h>
|
||||
#include <qnetworkaccessmanager.h>
|
||||
#include <qnetworkreply.h>
|
||||
#include <qnetworkrequest.h>
|
||||
#include <qstandardpaths.h>
|
||||
#include <qurl.h>
|
||||
|
||||
ThumbnailCache::ThumbnailCache(QObject* parent)
|
||||
: QObject(parent)
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
#include <QApplication>
|
||||
#include <QGuiApplication>
|
||||
#include <QJsonDocument>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QSequentialIterable>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QtCore>
|
||||
#include <QtNetwork>
|
||||
#include <qdir.h>
|
||||
#include <qobject.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qstring.h>
|
||||
class QNetworkAccessManager;
|
||||
|
||||
class ThumbnailCache : public QObject
|
||||
{
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
#include <QObject>
|
||||
#include <QOpenGLContext>
|
||||
#include <QQuickFramebufferObject>
|
||||
|
||||
#include "enums.hpp"
|
||||
|
||||
#ifndef BackendInterface_H
|
||||
#define BackendInterface_H
|
||||
|
||||
#include <QObject>
|
||||
#include "enums.hpp"
|
||||
class BackendInterface
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -1 +1 @@
|
|||
#include "enums.hpp"
|
||||
#include "enums.hpp"
|
|
@ -1,8 +1,9 @@
|
|||
#ifndef ENUMS_HPP
|
||||
#define ENUMS_HPP
|
||||
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include <qobject.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qstring.h>
|
||||
|
||||
namespace Enums {
|
||||
Q_NAMESPACE
|
||||
|
|
|
@ -1,9 +1,22 @@
|
|||
#include "logger.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <iostream>
|
||||
#include <qbytearray.h>
|
||||
#include <qsettings.h>
|
||||
#include <qstring.h>
|
||||
#include <qvariant.h>
|
||||
#include <spdlog/logger.h>
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
#include <iosfwd> // IWYU pragma: keep
|
||||
#include <memory> // IWYU pragma: keep
|
||||
#include <spdlog/spdlog.h> // IWYU pragma: export
|
||||
#include <spdlog/sinks/basic_file_sink.h> // IWYU pragma: export
|
||||
#include <spdlog/sinks/daily_file_sink.h> // IWYU pragma: export
|
||||
#include <spdlog/sinks/stdout_color_sinks.h> // IWYU pragma: export
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/details/file_helper-inl.h"
|
||||
#include "spdlog/sinks/ansicolor_sink-inl.h"
|
||||
#include "spdlog/sinks/base_sink-inl.h"
|
||||
#include "spdlog/sinks/basic_file_sink-inl.h"
|
||||
#include "spdlog/spdlog-inl.h"
|
||||
|
||||
std::shared_ptr<spdlog::logger>
|
||||
initLogger(std::string name)
|
||||
|
|
19
src/logger.h
19
src/logger.h
|
@ -1,18 +1,11 @@
|
|||
#ifndef LOGGER_HPP
|
||||
#define LOGGER_HPP
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
#include <spdlog/sinks/daily_file_sink.h>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
|
||||
#include <QProcessEnvironment>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QSequentialIterable>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QtCore>
|
||||
#include <QtNetwork>
|
||||
#include <iosfwd> // IWYU pragma: keep
|
||||
#include <memory> // IWYU pragma: keep
|
||||
#include <spdlog/spdlog.h> // IWYU pragma: keep
|
||||
#include <spdlog/sinks/basic_file_sink.h> // IWYU pragma: keep
|
||||
#include <spdlog/sinks/daily_file_sink.h> // IWYU pragma: keep
|
||||
#include <spdlog/sinks/stdout_color_sinks.h> // IWYU pragma: keep
|
||||
|
||||
std::shared_ptr<spdlog::logger>
|
||||
initLogger(std::string name);
|
||||
|
|
42
src/main.cpp
42
src/main.cpp
|
@ -1,28 +1,34 @@
|
|||
#include "logger.h"
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <locale.h>
|
||||
#include <qapplication.h>
|
||||
#include <qbytearray.h>
|
||||
#include <qmetatype.h>
|
||||
#include <qprocess.h>
|
||||
#include <qqml.h>
|
||||
#include <qqmlapplicationengine.h>
|
||||
#include <qsettings.h>
|
||||
#include <qstring.h>
|
||||
#include <qstringliteral.h>
|
||||
#include <qurl.h>
|
||||
#include <qvariant.h>
|
||||
#include <spdlog/fmt/fmt.h>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include "Backends/MPV/MPVBackend.hpp"
|
||||
#include "Backends/MPVNoFBO/MPVNoFBOBackend.hpp"
|
||||
|
||||
|
||||
#include "enums.hpp"
|
||||
#include "qmldebugger.h"
|
||||
#include "utils.hpp"
|
||||
#include <cstdlib>
|
||||
|
||||
#include "Process.h"
|
||||
#include "ThumbnailCache.h"
|
||||
#include "enums.hpp"
|
||||
#include <QApplication>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QtConcurrent>
|
||||
#include <QtCore>
|
||||
#include <QtQml>
|
||||
#include <stdbool.h>
|
||||
#include "logger.h"
|
||||
#include "qmldebugger.h"
|
||||
#include "spdlog/logger.h"
|
||||
#include "utils.hpp"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "setenv_mingw.hpp"
|
||||
#endif
|
||||
|
||||
#include "ThumbnailCache.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <initializer_list>
|
||||
#include <signal.h>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include "qmldebugger.h"
|
||||
|
||||
#include <QMetaObject>
|
||||
#include <QMetaProperty>
|
||||
#include <qhash.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qquickitem.h>
|
||||
#include <qvariant.h>
|
||||
|
||||
QString
|
||||
QMLDebugger::properties(QQuickItem* item, bool linebreak)
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#ifndef QMLDEBUGGER_H
|
||||
#define QMLDEBUGGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QQuickItem>
|
||||
#include <qobject.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qstring.h>
|
||||
class QQuickItem;
|
||||
|
||||
class QMLDebugger : public QObject
|
||||
{
|
||||
|
|
|
@ -1,25 +1,19 @@
|
|||
#include "utils.hpp"
|
||||
#include <qapplication.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qguiapplication.h>
|
||||
#include <qprocess.h>
|
||||
#include <qstringlist.h>
|
||||
#include <memory>
|
||||
#include "logger.h"
|
||||
#include "spdlog/logger.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QGuiApplication>
|
||||
#include <QJsonDocument>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QSequentialIterable>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QtCore>
|
||||
#include <QtNetwork>
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#ifdef ENABLE_X11
|
||||
#include <QX11Info>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
#if (defined(__linux__) || defined(__FreeBSD__)) && ENABLE_X11
|
||||
#include <X11/X.h> // IWYU pragma: keep
|
||||
#include <X11/Xlib.h> // IWYU pragma: keep
|
||||
#include <X11/Xutil.h> // IWYU pragma: keep
|
||||
#include <qx11info_x11.h> // IWYU pragma: keep
|
||||
#include <QX11Info> // IWYU pragma: keep
|
||||
#endif
|
||||
|
||||
auto utilsLogger = initLogger("utils");
|
||||
|
@ -112,8 +106,7 @@ SetDPMS(bool on)
|
|||
void
|
||||
AlwaysOnTop(WId wid, bool on)
|
||||
{
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#ifdef ENABLE_X11
|
||||
#if (defined(__linux__) || defined(__FreeBSD__)) && ENABLE_X11
|
||||
Display* display = QX11Info::display();
|
||||
XEvent event;
|
||||
event.xclient.type = ClientMessage;
|
||||
|
@ -135,7 +128,6 @@ AlwaysOnTop(WId wid, bool on)
|
|||
False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&event);
|
||||
#endif
|
||||
#else
|
||||
utilsLogger->error("Can't set on top for platform: {}",
|
||||
getPlatformName().toUtf8().constData());
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
#include <QObject>
|
||||
#include <QWindow>
|
||||
#include <QtGlobal>
|
||||
#include <stdbool.h>
|
||||
#include <qobject.h>
|
||||
#include <qobjectdefs.h>
|
||||
#include <qstring.h>
|
||||
#include <qwindowdefs.h>
|
||||
|
||||
namespace Utils {
|
||||
Q_NAMESPACE
|
||||
|
|
Loading…
Reference in a new issue