Misc: Purge remaining ByteStream references
This commit is contained in:
parent
a6518ff9dc
commit
6ce9e571ed
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
#include "progress_callback.h"
|
#include "progress_callback.h"
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "byte_stream.h"
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com> and contributors.
|
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com> and contributors.
|
||||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||||
|
|
||||||
#include "cheats.h"
|
#include "cheats.h"
|
||||||
#include "bus.h"
|
#include "bus.h"
|
||||||
#include "common/assert.h"
|
|
||||||
#include "common/byte_stream.h"
|
|
||||||
#include "common/file_system.h"
|
|
||||||
#include "common/log.h"
|
|
||||||
#include "common/small_string.h"
|
|
||||||
#include "common/string_util.h"
|
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "cpu_code_cache.h"
|
#include "cpu_code_cache.h"
|
||||||
#include "cpu_core.h"
|
#include "cpu_core.h"
|
||||||
#include "host.h"
|
#include "host.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
|
#include "common/assert.h"
|
||||||
|
#include "common/file_system.h"
|
||||||
|
#include "common/log.h"
|
||||||
|
#include "common/small_string.h"
|
||||||
|
#include "common/string_util.h"
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "util/input_manager.h"
|
#include "util/input_manager.h"
|
||||||
#include "util/postprocessing.h"
|
#include "util/postprocessing.h"
|
||||||
|
|
||||||
#include "common/byte_stream.h"
|
|
||||||
#include "common/error.h"
|
#include "common/error.h"
|
||||||
#include "common/file_system.h"
|
#include "common/file_system.h"
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/binary_reader_writer.h"
|
#include "common/binary_reader_writer.h"
|
||||||
#include "common/byte_stream.h"
|
|
||||||
#include "common/error.h"
|
#include "common/error.h"
|
||||||
#include "common/file_system.h"
|
#include "common/file_system.h"
|
||||||
#include "common/heterogeneous_containers.h"
|
#include "common/heterogeneous_containers.h"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "util/state_wrapper.h"
|
#include "util/state_wrapper.h"
|
||||||
|
|
||||||
#include "common/bitutils.h"
|
#include "common/bitutils.h"
|
||||||
#include "common/byte_stream.h"
|
|
||||||
#include "common/error.h"
|
#include "common/error.h"
|
||||||
#include "common/file_system.h"
|
#include "common/file_system.h"
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "core/system.h"
|
#include "core/system.h"
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/byte_stream.h"
|
|
||||||
#include "common/crash_handler.h"
|
#include "common/crash_handler.h"
|
||||||
#include "common/error.h"
|
#include "common/error.h"
|
||||||
#include "common/file_system.h"
|
#include "common/file_system.h"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "core/game_list.h"
|
#include "core/game_list.h"
|
||||||
#include "core/system.h"
|
#include "core/system.h"
|
||||||
|
|
||||||
#include "common/byte_stream.h"
|
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
|
|
||||||
#include <QtCore/QCoreApplication>
|
#include <QtCore/QCoreApplication>
|
||||||
|
@ -146,27 +145,6 @@ void ResizeColumnsForTreeView(QTreeView* view, const std::initializer_list<int>&
|
||||||
ResizeColumnsForView(view, widths);
|
ResizeColumnsForView(view, widths);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray ReadStreamToQByteArray(ByteStream* stream, bool rewind /*= false*/)
|
|
||||||
{
|
|
||||||
QByteArray ret;
|
|
||||||
const u64 old_pos = stream->GetPosition();
|
|
||||||
if (rewind && !stream->SeekAbsolute(0))
|
|
||||||
return {};
|
|
||||||
|
|
||||||
const u64 stream_size = stream->GetSize() - stream->GetPosition();
|
|
||||||
ret.resize(static_cast<int>(stream_size));
|
|
||||||
if (stream_size > 0 && !stream->Read2(ret.data(), static_cast<u32>(stream_size), nullptr))
|
|
||||||
return {};
|
|
||||||
|
|
||||||
stream->SeekAbsolute(old_pos);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool WriteQByteArrayToStream(QByteArray& arr, ByteStream* stream)
|
|
||||||
{
|
|
||||||
return arr.isEmpty() || stream->Write2(arr.data(), static_cast<u32>(arr.size()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenURL(QWidget* parent, const QUrl& qurl)
|
void OpenURL(QWidget* parent, const QUrl& qurl)
|
||||||
{
|
{
|
||||||
if (!QDesktopServices::openUrl(qurl))
|
if (!QDesktopServices::openUrl(qurl))
|
||||||
|
|
|
@ -77,12 +77,6 @@ void ResizeColumnsForTreeView(QTreeView* view, const std::initializer_list<int>&
|
||||||
/// NOTE: Defined in QtKeyCodes.cpp, not QtUtils.cpp.
|
/// NOTE: Defined in QtKeyCodes.cpp, not QtUtils.cpp.
|
||||||
u32 KeyEventToCode(const QKeyEvent* ev);
|
u32 KeyEventToCode(const QKeyEvent* ev);
|
||||||
|
|
||||||
/// Reads a whole stream to a Qt byte array.
|
|
||||||
QByteArray ReadStreamToQByteArray(ByteStream* stream, bool rewind = false);
|
|
||||||
|
|
||||||
/// Creates a stream from a Qt byte array.
|
|
||||||
bool WriteQByteArrayToStream(QByteArray& arr, ByteStream* stream);
|
|
||||||
|
|
||||||
/// Opens a URL with the default handler.
|
/// Opens a URL with the default handler.
|
||||||
void OpenURL(QWidget* parent, const QUrl& qurl);
|
void OpenURL(QWidget* parent, const QUrl& qurl);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
|
|
||||||
#include "common/bitutils.h"
|
#include "common/bitutils.h"
|
||||||
#include "common/byte_stream.h"
|
|
||||||
#include "common/fastjmp.h"
|
#include "common/fastjmp.h"
|
||||||
#include "common/file_system.h"
|
#include "common/file_system.h"
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
|
|
Loading…
Reference in New Issue