Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backward compatibility removal #1055

Open
wants to merge 5 commits into
base: synthetic-jungle
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.7.0)

project(AttorneyOnline VERSION 2.11.0.0 LANGUAGES CXX C)
project(AttorneyOnline VERSION 2.12.0.0 LANGUAGES CXX C)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -103,6 +103,7 @@ qt_add_executable(Attorney_Online
src/screenslidetimer.h src/screenslidetimer.cpp
src/moderation_functions.h src/moderation_functions.cpp
src/network/serverinfo.h src/network/serverinfo.cpp
src/vpath.h src/vpath.cpp
)

set_target_properties(Attorney_Online PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
Expand Down
1 change: 0 additions & 1 deletion src/animationlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#endif

class AOApplication;
class VPath;

// "Brief" explanation of what the hell this is:
//
Expand Down
23 changes: 4 additions & 19 deletions src/aoapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "demoserver.h"
#include "discord_rich_presence.h"
#include "serverdata.h"
#include "vpath.h"
#include "widgets/aooptionsdialog.h"

#include <bass.h>
Expand All @@ -30,24 +31,6 @@ class Lobby;
class Courtroom;
class Options;

class VPath : QString
{
using QString::QString;

public:
explicit VPath(const QString &str)
: QString(str)
{}
inline const QString &toQString() const { return *this; }
inline bool operator==(const VPath &str) const { return this->toQString() == str.toQString(); }
inline VPath operator+(const VPath &str) const { return VPath(this->toQString() + str.toQString()); }
};

inline size_t qHash(const VPath &key, uint seed = qGlobalQHashSeed())
{
return qHash(key.toQString(), seed);
}

class AOApplication : public QObject
{
Q_OBJECT
Expand Down Expand Up @@ -103,7 +86,7 @@ class AOApplication : public QObject
static QString get_version_string();

static const int RELEASE = 2;
static const int MAJOR_VERSION = 11;
static const int MAJOR_VERSION = 12;
static const int MINOR_VERSION = 0;

void set_server_list(QVector<ServerInfo> &servers) { server_list = servers; }
Expand Down Expand Up @@ -201,6 +184,8 @@ class AOApplication : public QObject
// Figure out if we can opus this or if we should fall back to wav
QString get_sfx_suffix(VPath sound_to_check);

QList<SfxItem> get_sfx_list(QString file_name);

// Can we use APNG for this? If not, WEBP? If not, GIF? If not, fall back to
// PNG.
QString get_image_suffix(VPath path_to_check, bool static_image = false);
Expand Down
2 changes: 1 addition & 1 deletion src/aomusicplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ QString AOMusicPlayer::playStream(QString song, int streamId, bool loopEnabled,
{
QStringList lines = ao_app->read_file(d_path).split("\n");
bool seconds_mode = false;
foreach (QString line, lines)
for (QString line : lines)
{
QStringList args = line.split("=");
if (args.size() < 2)
Expand Down
2 changes: 1 addition & 1 deletion src/charselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void Courtroom::character_loading_finished()
ao_app->generated_chars = 0;
if (ui_char_button_list.size() > 0)
{
foreach (AOCharButton *item, ui_char_button_list)
for (AOCharButton *item : ui_char_button_list)
{
delete item;
}
Expand Down
Loading