From 1ab1c245624de78b6ee44b521b762231eb57915e Mon Sep 17 00:00:00 2001 From: Sylvain Colinet Date: Tue, 17 Dec 2024 22:22:13 +0100 Subject: [PATCH] Move the core files to a core directory --- QUsb2snes.pro | 18 ++++++++------- QUsb2snes.qbs | 22 +++++++++---------- adevice.cpp => core/adevice.cpp | 0 adevice.h => core/adevice.h | 0 devicefactory.cpp => core/devicefactory.cpp | 0 devicefactory.h => core/devicefactory.h | 0 localstorage.cpp => core/localstorage.cpp | 0 localstorage.h => core/localstorage.h | 0 usb2snes.h => core/usb2snes.h | 0 wsserver.cpp => core/wsserver.cpp | 0 wsserver.h => core/wsserver.h | 0 .../wsservercommands.cpp | 0 devices/emunetworkaccessdevice.h | 4 ++-- devices/emunetworkaccessfactory.h | 2 +- devices/luabridge.h | 2 +- devices/luabridgedevice.h | 2 +- devices/retroarchdevice.h | 2 +- devices/retroarchfactory.h | 2 +- devices/sd2snesdevice.h | 2 +- devices/sd2snesfactory.h | 2 +- devices/snesclassic.h | 2 +- devices/snesclassicfactory.h | 2 +- ui/appui.cpp | 4 ++-- ui/appuimenu.cpp | 2 +- ui/diagnosticdialog.h | 2 +- 25 files changed, 36 insertions(+), 34 deletions(-) rename adevice.cpp => core/adevice.cpp (100%) rename adevice.h => core/adevice.h (100%) rename devicefactory.cpp => core/devicefactory.cpp (100%) rename devicefactory.h => core/devicefactory.h (100%) rename localstorage.cpp => core/localstorage.cpp (100%) rename localstorage.h => core/localstorage.h (100%) rename usb2snes.h => core/usb2snes.h (100%) rename wsserver.cpp => core/wsserver.cpp (100%) rename wsserver.h => core/wsserver.h (100%) rename wsservercommands.cpp => core/wsservercommands.cpp (100%) diff --git a/QUsb2snes.pro b/QUsb2snes.pro index 790e847..430622c 100644 --- a/QUsb2snes.pro +++ b/QUsb2snes.pro @@ -59,7 +59,9 @@ equals(QUSB2SNES_NOGUI, 1) { include($$PWD/devices/EmuNWAccess-qt/EmuNWAccess-qt.pri) -SOURCES += adevice.cpp \ +INCLUDEPATH += core/ + +SOURCES += core/adevice.cpp \ devicefactory.cpp \ devices/sd2snesfactory.cpp \ devices/snesclassicfactory.cpp \ @@ -79,12 +81,12 @@ SOURCES += adevice.cpp \ rommapping/rominfo.c \ devices/sd2snesdevice.cpp \ devices/snesclassic.cpp \ - localstorage.cpp \ - wsserver.cpp \ - wsservercommands.cpp + core/localstorage.cpp \ + core/wsserver.cpp \ + core/wsservercommands.cpp -HEADERS += adevice.h \ - devicefactory.h \ +HEADERS += core/adevice.h \ + core/devicefactory.h \ devices/deviceerror.h \ devices/sd2snesfactory.h \ devices/snesclassicfactory.h \ @@ -101,9 +103,9 @@ HEADERS += adevice.h \ devices/sd2snesdevice.h \ devices/snesclassic.h \ localstorage.h \ - usb2snes.h \ + core/usb2snes.h \ sqpath.h \ - wsserver.h + core/wsserver.h macx: { message("MAC OS BUILD") diff --git a/QUsb2snes.qbs b/QUsb2snes.qbs index c7fb345..ff9b6cc 100644 --- a/QUsb2snes.qbs +++ b/QUsb2snes.qbs @@ -6,14 +6,14 @@ Project { QtApplication { name : "QUsb2Snes" cpp.cxxLanguageVersion: "c++11" - cpp.includePaths: ["devices/EmuNWAccess-qt", "./"] + cpp.includePaths: ["devices/EmuNWAccess-qt", "./", "core/"] consoleApplication: false files: [ "TODO", "devices/EmuNWAccess-qt/emunwaccessclient.cpp", "devices/EmuNWAccess-qt/emunwaccessclient.h", - "adevice.cpp", - "adevice.h", + "core/adevice.cpp", + "core/adevice.h", "sqpath.h", "ui/appui.cpp", "ui/appuimenu.cpp", @@ -27,8 +27,8 @@ Project { "ui/diagnosticdialog.h", "ui/diagnosticdialog.ui", "backward.hpp", - "devicefactory.cpp", - "devicefactory.h", + "core/devicefactory.cpp", + "core/devicefactory.h", "devices/deviceerror.cpp", "devices/deviceerror.h", "devices/emunetworkaccessdevice.cpp", @@ -49,8 +49,8 @@ Project { "devices/luabridge.h", "devices/luabridgedevice.cpp", "devices/luabridgedevice.h", - "localstorage.cpp", - "localstorage.h", + "core/localstorage.cpp", + "core/localstorage.h", "main.cpp", "qskarsnikringlist.hpp", "qusb2snes.rc", @@ -86,10 +86,10 @@ Project { "ui/wizard/snesclassicpage.cpp", "ui/wizard/snesclassicpage.h", "ui/wizard/snesclassicpage.ui", - "usb2snes.h", - "wsserver.cpp", - "wsserver.h", - "wsservercommands.cpp", + "core/usb2snes.h", + "core/wsserver.cpp", + "core/wsserver.h", + "core/wsservercommands.cpp", ] Group { diff --git a/adevice.cpp b/core/adevice.cpp similarity index 100% rename from adevice.cpp rename to core/adevice.cpp diff --git a/adevice.h b/core/adevice.h similarity index 100% rename from adevice.h rename to core/adevice.h diff --git a/devicefactory.cpp b/core/devicefactory.cpp similarity index 100% rename from devicefactory.cpp rename to core/devicefactory.cpp diff --git a/devicefactory.h b/core/devicefactory.h similarity index 100% rename from devicefactory.h rename to core/devicefactory.h diff --git a/localstorage.cpp b/core/localstorage.cpp similarity index 100% rename from localstorage.cpp rename to core/localstorage.cpp diff --git a/localstorage.h b/core/localstorage.h similarity index 100% rename from localstorage.h rename to core/localstorage.h diff --git a/usb2snes.h b/core/usb2snes.h similarity index 100% rename from usb2snes.h rename to core/usb2snes.h diff --git a/wsserver.cpp b/core/wsserver.cpp similarity index 100% rename from wsserver.cpp rename to core/wsserver.cpp diff --git a/wsserver.h b/core/wsserver.h similarity index 100% rename from wsserver.h rename to core/wsserver.h diff --git a/wsservercommands.cpp b/core/wsservercommands.cpp similarity index 100% rename from wsservercommands.cpp rename to core/wsservercommands.cpp diff --git a/devices/emunetworkaccessdevice.h b/devices/emunetworkaccessdevice.h index 4308be5..0b11695 100644 --- a/devices/emunetworkaccessdevice.h +++ b/devices/emunetworkaccessdevice.h @@ -26,8 +26,8 @@ #include -#include "../adevice.h" -#include "../localstorage.h" +#include "adevice.h" +#include "localstorage.h" #include "emunwaccessclient.h" #include "../rommapping/rommapping.h" diff --git a/devices/emunetworkaccessfactory.h b/devices/emunetworkaccessfactory.h index b28266a..2ab6b94 100644 --- a/devices/emunetworkaccessfactory.h +++ b/devices/emunetworkaccessfactory.h @@ -22,7 +22,7 @@ #define EMUNETWORKACCESSFACTORY_H #include -#include "../devicefactory.h" +#include "devicefactory.h" #include "emunetworkaccessdevice.h" #include "emunwaccessclient.h" diff --git a/devices/luabridge.h b/devices/luabridge.h index 22103fb..8f1f3c9 100644 --- a/devices/luabridge.h +++ b/devices/luabridge.h @@ -21,7 +21,7 @@ #ifndef LUABRIDGE_H #define LUABRIDGE_H -#include "../devicefactory.h" +#include "devicefactory.h" #include "luabridgedevice.h" #include diff --git a/devices/luabridgedevice.h b/devices/luabridgedevice.h index ec9ac91..3633823 100644 --- a/devices/luabridgedevice.h +++ b/devices/luabridgedevice.h @@ -21,7 +21,7 @@ #ifndef LUABRIDGEDEVICE_H #define LUABRIDGEDEVICE_H -#include "../adevice.h" +#include "adevice.h" #include #include diff --git a/devices/retroarchdevice.h b/devices/retroarchdevice.h index b789159..c6140d6 100644 --- a/devices/retroarchdevice.h +++ b/devices/retroarchdevice.h @@ -21,7 +21,7 @@ #ifndef RETROARCHDEVICE_H #define RETROARCHDEVICE_H -#include "../adevice.h" +#include "adevice.h" #include "retroarchhost.h" #include "../rommapping/rominfo.h" diff --git a/devices/retroarchfactory.h b/devices/retroarchfactory.h index 4c60d7a..9639569 100644 --- a/devices/retroarchfactory.h +++ b/devices/retroarchfactory.h @@ -23,7 +23,7 @@ #include #include -#include "../devicefactory.h" +#include "devicefactory.h" #include "retroarchhost.h" #include "retroarchdevice.h" diff --git a/devices/sd2snesdevice.h b/devices/sd2snesdevice.h index d575e4b..4226ed1 100644 --- a/devices/sd2snesdevice.h +++ b/devices/sd2snesdevice.h @@ -25,7 +25,7 @@ #include #include #include -#include "../adevice.h" +#include "adevice.h" class SD2SnesDevice : public ADevice { diff --git a/devices/sd2snesfactory.h b/devices/sd2snesfactory.h index 1cb0f1b..8793deb 100644 --- a/devices/sd2snesfactory.h +++ b/devices/sd2snesfactory.h @@ -24,7 +24,7 @@ #include #include -#include "../devicefactory.h" +#include "devicefactory.h" #include "sd2snesdevice.h" class SD2SnesFactory : public DeviceFactory diff --git a/devices/snesclassic.h b/devices/snesclassic.h index cdf3630..e943833 100644 --- a/devices/snesclassic.h +++ b/devices/snesclassic.h @@ -21,7 +21,7 @@ #ifndef SNESCLASSIC_H #define SNESCLASSIC_H -#include "../adevice.h" +#include "adevice.h" #include #include diff --git a/devices/snesclassicfactory.h b/devices/snesclassicfactory.h index 11cdcd4..2d9de61 100644 --- a/devices/snesclassicfactory.h +++ b/devices/snesclassicfactory.h @@ -24,7 +24,7 @@ #include #include -#include "../devicefactory.h" +#include "devicefactory.h" #include "snesclassic.h" diff --git a/ui/appui.cpp b/ui/appui.cpp index a5f9a54..4d3447b 100644 --- a/ui/appui.cpp +++ b/ui/appui.cpp @@ -44,9 +44,9 @@ Q_LOGGING_CATEGORY(log_appUi, "APPUI") #define sDebug() qCDebug(log_appUi) #define sInfo() qCInfo(log_appUi) -#include "../usb2snes.h" +//#include "../core/usb2snes.h" #include "appui.h" -#include "../wsserver.h" +#include "wsserver.h" #include "sqpath.h" diff --git a/ui/appuimenu.cpp b/ui/appuimenu.cpp index 64bd8f6..0c32efd 100644 --- a/ui/appuimenu.cpp +++ b/ui/appuimenu.cpp @@ -8,7 +8,7 @@ #include "appui.h" #include "diagnosticdialog.h" -#include "../wsserver.h" +#include "wsserver.h" Q_LOGGING_CATEGORY(log_appUiMenu, "APPUIMenu") #define sDebug() qCDebug(log_appUiMenu) diff --git a/ui/diagnosticdialog.h b/ui/diagnosticdialog.h index 7f81d29..651b283 100644 --- a/ui/diagnosticdialog.h +++ b/ui/diagnosticdialog.h @@ -1,7 +1,7 @@ #ifndef DIAGNOSTICDIALOG_H #define DIAGNOSTICDIALOG_H -#include "../wsserver.h" +#include "wsserver.h" #include