A little cleaning
This commit is contained in:
parent
bf91ced42b
commit
62f81be11a
|
@ -1,7 +1,7 @@
|
|||
#ifndef FONTPROVIDERSTUB_H
|
||||
#define FONTPROVIDERSTUB_H
|
||||
|
||||
#include "engraving/infrastructure/draw/ifontprovider.h"
|
||||
#include "engraving/draw/ifontprovider.h"
|
||||
|
||||
namespace mu::draw {
|
||||
class FontProviderStub : public IFontProvider
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "io/buffer.h"
|
||||
|
||||
#include "engraving/compat/scoreaccess.h"
|
||||
#include "engraving/infrastructure/io/mscwriter.h"
|
||||
#include "engraving/io/mscwriter.h"
|
||||
#include "engraving/libmscore/excerpt.h"
|
||||
|
||||
#include "backendjsonwriter.h"
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
set(MODULE engraving)
|
||||
set(MODULE_QRC engraving.qrc)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/infrastructure/engraving_infrastructure.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/libmscore/libmscore.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/compat/midi/compatmidi.cmake)
|
||||
|
||||
|
@ -34,7 +33,21 @@ set(MODULE_SRC
|
|||
${CMAKE_CURRENT_LIST_DIR}/engravingproject.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/iengravingconfiguration.h
|
||||
|
||||
${ENGRAVING_INFRASTRUCTURE_SRC}
|
||||
${CMAKE_CURRENT_LIST_DIR}/interactive/messagebox.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/interactive/messagebox.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/interactive/imimedata.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscio.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscreader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscreader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscwriter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscwriter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/htmlparser.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/htmlparser.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/ifileinfoprovider.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/localfileinfoprovider.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/localfileinfoprovider.h
|
||||
|
||||
${LIBMSCORE_SRC}
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/rw/xml.h
|
||||
|
@ -200,15 +213,28 @@ set(MODULE_SRC
|
|||
${CMAKE_CURRENT_LIST_DIR}/playback/utils/arrangementutils.h
|
||||
)
|
||||
|
||||
if (NOT ENGRAVING_NO_ACCESSIBILITY)
|
||||
set(MODULE_SRC ${MODULE_SRC}
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleitem.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleitem.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleroot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleroot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessiblenote.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessiblenote.h
|
||||
)
|
||||
if (ENGRAVING_NO_ACCESSIBILITY)
|
||||
set(MODULE_DEF ${MODULE_DEF} -DENGRAVING_NO_ACCESSIBILITY)
|
||||
else()
|
||||
set(MODULE_SRC ${MODULE_SRC}
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleitem.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleitem.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleroot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessibleroot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessiblenote.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/accessibility/accessiblenote.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if (ENGRAVING_NO_INTERNAL)
|
||||
set(MODULE_DEF ${MODULE_DEF} -DENGRAVING_NO_INTERNAL -DENGRAVING_NO_QTEXTDOCUMENT -DENGRAVING_NO_INTERACTIVE)
|
||||
else()
|
||||
set(MODULE_SRC ${MODULE_SRC}
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/engravingconfiguration.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/engravingconfiguration.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/qmimedataadapter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/qmimedataadapter.h
|
||||
)
|
||||
endif()
|
||||
|
||||
set_source_files_properties( # For these files, Unity Build does not work
|
||||
|
@ -224,7 +250,7 @@ set(MODULE_INCLUDE
|
|||
${CMAKE_CURRENT_LIST_DIR}/infrastructure
|
||||
)
|
||||
|
||||
set(MODULE_DEF ${ENGRAVING_INFRASTRUCTURE_DEF})
|
||||
set(MODULE_DEF ${MODULE_DEF} ${ENGRAVING_INFRASTRUCTURE_DEF})
|
||||
set(MODULE_LINK
|
||||
${ENGRAVING_INFRASTRUCTURE_LINK}
|
||||
draw
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "../rw/scorereader.h"
|
||||
|
||||
#include "infrastructure/io/localfileinfoprovider.h"
|
||||
#include "io/localfileinfoprovider.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "global/allocator.h"
|
||||
|
||||
#ifndef ENGRAVING_NO_INTERNAL
|
||||
#include "engraving/infrastructure/internal/engravingconfiguration.h"
|
||||
#include "internal/engravingconfiguration.h"
|
||||
#endif
|
||||
|
||||
#ifndef ENGRAVING_NO_ACCESSIBILITY
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include <memory>
|
||||
|
||||
#include "engravingerrors.h"
|
||||
#include "infrastructure/io/mscreader.h"
|
||||
#include "infrastructure/io/mscwriter.h"
|
||||
#include "infrastructure/io/ifileinfoprovider.h"
|
||||
#include "io/mscreader.h"
|
||||
#include "io/mscwriter.h"
|
||||
#include "io/ifileinfoprovider.h"
|
||||
|
||||
#include "modularity/ioc.h"
|
||||
#include "diagnostics/iengravingelementsprovider.h"
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
set (ENGRAVING_INFRASTRUCTURE_SRC
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/interactive/messagebox.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/interactive/messagebox.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/interactive/imimedata.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscio.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscreader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscreader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscwriter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/mscwriter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/htmlparser.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/htmlparser.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/ifileinfoprovider.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/localfileinfoprovider.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/io/localfileinfoprovider.h
|
||||
)
|
||||
|
||||
set(ENGRAVING_INFRASTRUCTURE_DEF )
|
||||
set(ENGRAVING_INFRASTRUCTURE_LINK )
|
||||
|
||||
if (ENGRAVING_NO_INTERNAL)
|
||||
set(ENGRAVING_INFRASTRUCTURE_DEF -DENGRAVING_NO_INTERNAL)
|
||||
else()
|
||||
set(ENGRAVING_INFRASTRUCTURE_SRC ${ENGRAVING_INFRASTRUCTURE_SRC}
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/engravingconfiguration.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/engravingconfiguration.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/qmimedataadapter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/qmimedataadapter.h
|
||||
)
|
||||
endif()
|
|
@ -22,7 +22,7 @@
|
|||
#ifndef MU_ENGRAVING_QMIMEDATAADAPTER_H
|
||||
#define MU_ENGRAVING_QMIMEDATAADAPTER_H
|
||||
|
||||
#include "infrastructure/interactive/imimedata.h"
|
||||
#include "interactive/imimedata.h"
|
||||
|
||||
class QMimeData;
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#ifndef MU_ENGRAVING_MASTERSCORE_H
|
||||
#define MU_ENGRAVING_MASTERSCORE_H
|
||||
|
||||
#include "infrastructure/io/ifileinfoprovider.h"
|
||||
#include "io/ifileinfoprovider.h"
|
||||
|
||||
#include "score.h"
|
||||
#include "instrument.h"
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
#include "synthesizerstate.h"
|
||||
#include "rootitem.h"
|
||||
|
||||
#include "infrastructure/io/mscwriter.h"
|
||||
#include "infrastructure/io/mscreader.h"
|
||||
#include "io/mscwriter.h"
|
||||
#include "io/mscreader.h"
|
||||
#include "draw/iimageprovider.h"
|
||||
#include "infrastructure/interactive/imimedata.h"
|
||||
#include "interactive/imimedata.h"
|
||||
|
||||
#include "rw/readcontext.h"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "../engravingerrors.h"
|
||||
#include "xml.h"
|
||||
#include "../infrastructure/io/mscreader.h"
|
||||
#include "io/mscreader.h"
|
||||
#include "readcontext.h"
|
||||
#include "../libmscore/masterscore.h"
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ void XmlWriter::tagFraction(const AsciiStringView& name, const Fraction& v, cons
|
|||
void XmlWriter::writeXml(const String& name, String s)
|
||||
{
|
||||
for (size_t i = 0; i < s.size(); ++i) {
|
||||
ushort c = s.at(i).unicode();
|
||||
char16_t c = s.at(i).unicode();
|
||||
if (c < 0x20 && c != 0x09 && c != 0x0A && c != 0x0D) {
|
||||
s[i] = u'?';
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <QClipboard>
|
||||
#include <QMimeData>
|
||||
|
||||
#include "infrastructure/internal/qmimedataadapter.h"
|
||||
#include "internal/qmimedataadapter.h"
|
||||
|
||||
#include "engraving/rw/xml.h"
|
||||
#include "libmscore/masterscore.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <QClipboard>
|
||||
#include <QMimeData>
|
||||
|
||||
#include "infrastructure/internal/qmimedataadapter.h"
|
||||
#include "internal/qmimedataadapter.h"
|
||||
|
||||
#include "engraving/rw/xml.h"
|
||||
#include "libmscore/masterscore.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "engraving/compat/scoreaccess.h"
|
||||
#include "engraving/compat/mscxcompat.h"
|
||||
#include "engraving/compat/writescorehook.h"
|
||||
#include "engraving/infrastructure/io/localfileinfoprovider.h"
|
||||
#include "engraving/io/localfileinfoprovider.h"
|
||||
#include "engraving/rw/xml.h"
|
||||
#include "engraving/libmscore/factory.h"
|
||||
|
||||
|
|
|
@ -135,7 +135,6 @@ bool CoreAudioDriver::open(const IAudioDriver::Spec& spec, IAudioDriver::Spec* a
|
|||
s_data->pFormat = *deviceFormat;
|
||||
s_data->pFormat.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
|
||||
s_data->pFormat.nChannels = spec.channels;
|
||||
LOGI() << s_data->pFormat.nSamplesPerSec;
|
||||
s_data->pFormat.wBitsPerSample = 32;
|
||||
s_data->pFormat.nAvgBytesPerSec = s_data->pFormat.nSamplesPerSec * s_data->pFormat.nChannels * sizeof(float);
|
||||
s_data->pFormat.nBlockAlign = (s_data->pFormat.nChannels * s_data->pFormat.wBitsPerSample) / 8;
|
||||
|
@ -192,7 +191,7 @@ bool CoreAudioDriver::open(const IAudioDriver::Spec& spec, IAudioDriver::Spec* a
|
|||
|
||||
DWORD waitResult = WaitForSingleObject(s_data->hEvent, INFINITE);
|
||||
if (waitResult != WAIT_OBJECT_0) {
|
||||
LOGE() << "audio driver wait for signal failed: " << waitResult;
|
||||
LOGE() << "audio driver wait for signal failed: " << int32_t(waitResult);
|
||||
break;
|
||||
}
|
||||
} while (m_active);
|
||||
|
|
|
@ -64,7 +64,7 @@ set(MODULE_SRC
|
|||
)
|
||||
|
||||
if (DRAW_NO_INTERNAL)
|
||||
set(MODULE_DEF -DDRAW_NO_INTERNAL)
|
||||
set(MODULE_DEF -DDRAW_NO_INTERNAL -DDRAW_NO_QSVGRENDER)
|
||||
else()
|
||||
set(MODULE_SRC ${MODULE_SRC}
|
||||
${CMAKE_CURRENT_LIST_DIR}/internal/qpainterprovider.cpp
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
#include "svgrenderer.h"
|
||||
|
||||
#ifndef ENGRAVING_NO_QSVGRENDER
|
||||
#ifndef DRAW_NO_QSVGRENDER
|
||||
#include <QPainter>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
|
@ -36,7 +36,7 @@ using namespace mu::draw;
|
|||
|
||||
SvgRenderer::SvgRenderer(const ByteArray& data)
|
||||
{
|
||||
#ifndef ENGRAVING_NO_QSVGRENDER
|
||||
#ifndef DRAW_NO_QSVGRENDER
|
||||
m_qSvgRenderer = new QSvgRenderer(data.toQByteArray());
|
||||
#else
|
||||
NOT_SUPPORTED;
|
||||
|
@ -46,14 +46,14 @@ SvgRenderer::SvgRenderer(const ByteArray& data)
|
|||
|
||||
SvgRenderer::~SvgRenderer()
|
||||
{
|
||||
#ifndef ENGRAVING_NO_QSVGRENDER
|
||||
#ifndef DRAW_NO_QSVGRENDER
|
||||
delete m_qSvgRenderer;
|
||||
#endif
|
||||
}
|
||||
|
||||
mu::SizeF SvgRenderer::defaultSize() const
|
||||
{
|
||||
#ifndef ENGRAVING_NO_QSVGRENDER
|
||||
#ifndef DRAW_NO_QSVGRENDER
|
||||
return SizeF::fromQSizeF(m_qSvgRenderer->defaultSize());
|
||||
#else
|
||||
NOT_SUPPORTED;
|
||||
|
@ -63,7 +63,7 @@ mu::SizeF SvgRenderer::defaultSize() const
|
|||
|
||||
void SvgRenderer::render(Painter* painter, const RectF& rect)
|
||||
{
|
||||
#ifndef ENGRAVING_NO_QSVGRENDER
|
||||
#ifndef DRAW_NO_QSVGRENDER
|
||||
IPaintProviderPtr paintProvider = painter->provider();
|
||||
std::shared_ptr<QPainterProvider> qPaintProvider = std::dynamic_pointer_cast<QPainterProvider>(paintProvider);
|
||||
if (qPaintProvider) {
|
||||
|
|
|
@ -118,7 +118,9 @@ set(MODULE_SRC
|
|||
${CMAKE_CURRENT_LIST_DIR}/serialization/xmldom.h
|
||||
)
|
||||
|
||||
if (NOT GLOBAL_NO_INTERNAL)
|
||||
if (GLOBAL_NO_INTERNAL)
|
||||
set(MODULE_DEF ${MODULE_DEF} -DGLOBAL_NO_INTERNAL)
|
||||
else()
|
||||
set(MODULE_SRC ${MODULE_SRC}
|
||||
${CMAKE_CURRENT_LIST_DIR}/globalmodule.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/globalmodule.h
|
||||
|
|
|
@ -91,7 +91,7 @@ const char* path_t::c_str() const
|
|||
return m_path.c_str();
|
||||
}
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
path_t::path_t(const QString& s)
|
||||
: m_path(s.toStdString())
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "types/string.h"
|
||||
#include "framework/global/logstream.h"
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
#include <QString>
|
||||
#endif
|
||||
|
||||
|
@ -69,7 +69,7 @@ struct path_t {
|
|||
std::string toStdString() const;
|
||||
const char* c_str() const;
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
path_t(const QString& s);
|
||||
inline path_t& operator=(const QString& other) { m_path = other.toStdString(); return *this; }
|
||||
inline path_t operator+(const QString& other) const { path_t p = *this; p += String::fromQString(other); return p; }
|
||||
|
@ -85,7 +85,7 @@ private:
|
|||
inline path_t operator+(const String& one, const path_t& other) { return path_t(one) + other; }
|
||||
inline path_t operator+(const char* one, const path_t& other) { return path_t(one) + other; }
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
inline path_t operator+(const QString& one, const path_t& other) { return path_t(one) + other; }
|
||||
#endif
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
|
||||
using namespace mu::io;
|
||||
|
||||
typedef unsigned long int ulong;
|
||||
typedef unsigned short int ushort;
|
||||
|
||||
namespace mu {
|
||||
static inline uint readUInt(const uint8_t* data)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,8 @@ public:
|
|||
inline Stream& operator<<(unsigned int t) { m_ss << t; return *this; }
|
||||
inline Stream& operator<<(signed long t) { m_ss << t; return *this; }
|
||||
inline Stream& operator<<(unsigned long t) { m_ss << t; return *this; }
|
||||
inline Stream& operator<<(signed long long t) { m_ss << t; return *this; }
|
||||
inline Stream& operator<<(unsigned long long t) { m_ss << t; return *this; }
|
||||
inline Stream& operator<<(float t) { m_ss << t; return *this; }
|
||||
inline Stream& operator<<(double t) { m_ss << t; return *this; }
|
||||
inline Stream& operator<<(const void* t) { m_ss << t; return *this; }
|
||||
|
@ -47,8 +49,6 @@ public:
|
|||
}
|
||||
|
||||
#ifdef HAW_LOGGER_QT_SUPPORT
|
||||
inline Stream& operator<<(qint64 t) { qt_to_ss(t); return *this; }
|
||||
inline Stream& operator<<(quint64 t) { qt_to_ss(t); return *this; }
|
||||
inline Stream& operator<<(QChar t) { qt_to_ss(t); return *this; }
|
||||
inline Stream& operator<<(const QString& t) { qt_to_ss(t); return *this; }
|
||||
inline Stream& operator<<(const QStringRef& t) { qt_to_ss(t); return *this; }
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
#include "translation.h"
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
#include <QCoreApplication>
|
||||
#endif
|
||||
|
||||
|
@ -31,7 +31,7 @@ using namespace mu;
|
|||
|
||||
static String translate(const char* context, const char* key, const char* disambiguation, int n)
|
||||
{
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
return String::fromQString(QCoreApplication::translate(context, key, disambiguation, n));
|
||||
#else
|
||||
UNUSED(context);
|
||||
|
@ -46,7 +46,7 @@ std::string mu::trc(const char* context, const char* key, const char* disambigua
|
|||
return translate(context, key, disambiguation, n).toStdString();
|
||||
}
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
QString mu::qtrc(const char* context, const char* key, const char* disambiguation, int n)
|
||||
{
|
||||
return QCoreApplication::translate(context, key, disambiguation, n);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "types/string.h"
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
#include <QString>
|
||||
#endif
|
||||
|
||||
|
@ -35,13 +35,13 @@ String mtrc(const char* context, const char* key, const char* disambiguation = n
|
|||
String mtrc(const char* context, const String& key, const char* disambiguation = nullptr, int n = -1);
|
||||
String mtrc(const char* context, const String& key, const String& disambiguation, int n = -1);
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
QString qtrc(const char* context, const char* key, const char* disambiguation = nullptr, int n = -1);
|
||||
QString qtrc(const char* context, const String& key, const char* disambiguation = nullptr, int n = -1);
|
||||
QString qtrc(const char* context, const String& key, const String& disambiguation, int n = -1);
|
||||
#endif
|
||||
|
||||
#ifdef GLOBAL_NO_QT_SUPPORT
|
||||
#ifdef NO_QT_SUPPORT
|
||||
#define QT_TRANSLATE_NOOP(ctx, msg) msg
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
#include <QByteArray>
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
ByteArray left(size_t len) const;
|
||||
ByteArray right(size_t len) const;
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
static ByteArray fromQByteArray(const QByteArray& ba)
|
||||
{
|
||||
return ByteArray(reinterpret_cast<const uint8_t*>(ba.constData()), ba.size());
|
||||
|
|
|
@ -116,7 +116,7 @@ char Char::toAscii(char16_t c, bool* ok)
|
|||
bool Char::isLetter(char16_t c)
|
||||
{
|
||||
//! TODO
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
return QChar::isLetter(c);
|
||||
#else
|
||||
return std::isalpha(static_cast<unsigned char>(c));
|
||||
|
@ -126,7 +126,7 @@ bool Char::isLetter(char16_t c)
|
|||
bool Char::isSpace(char16_t c)
|
||||
{
|
||||
//! TODO
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
return QChar::isSpace(c);
|
||||
#else
|
||||
return std::isspace(static_cast<unsigned char>(c));
|
||||
|
@ -148,7 +148,7 @@ int Char::digitValue() const
|
|||
|
||||
bool Char::isPunct(char16_t ch)
|
||||
{
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
return QChar::isPunct(ch);
|
||||
#else
|
||||
return std::ispunct(static_cast<unsigned char>(ch));
|
||||
|
@ -158,7 +158,7 @@ bool Char::isPunct(char16_t ch)
|
|||
char16_t Char::toLower(char16_t ch)
|
||||
{
|
||||
//! TODO
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
return QChar::toLower(ch);
|
||||
#else
|
||||
return std::tolower(static_cast<unsigned char>(ch));
|
||||
|
@ -168,7 +168,7 @@ char16_t Char::toLower(char16_t ch)
|
|||
char16_t Char::toUpper(char16_t ch)
|
||||
{
|
||||
//! TODO
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
return QChar::toUpper(ch);
|
||||
#else
|
||||
return std::toupper(static_cast<unsigned char>(ch));
|
||||
|
@ -439,7 +439,7 @@ std::u32string String::toStdU32String() const
|
|||
return s32;
|
||||
}
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
String String::fromQString(const QString& str)
|
||||
{
|
||||
const QChar* qu = str.unicode();
|
||||
|
@ -891,7 +891,7 @@ String String::trimmed() const
|
|||
String String::simplified() const
|
||||
{
|
||||
//! TODO
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
return String::fromQString(toQString().simplified());
|
||||
#else
|
||||
return *this;
|
||||
|
@ -937,7 +937,7 @@ String String::toXmlEscaped() const
|
|||
String String::toLower() const
|
||||
{
|
||||
//! TODO
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
QString qs = toQString();
|
||||
return String::fromQString(qs.toLower());
|
||||
#else
|
||||
|
@ -951,7 +951,7 @@ String String::toLower() const
|
|||
String String::toUpper() const
|
||||
{
|
||||
//! TODO
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
QString qs = toQString();
|
||||
return String::fromQString(qs.toUpper());
|
||||
#else
|
||||
|
@ -1088,7 +1088,7 @@ void StringList::removeAt(size_t i)
|
|||
erase(begin() + i);
|
||||
}
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
StringList::StringList(const QStringList& l)
|
||||
{
|
||||
reserve(l.size());
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "bytearray.h"
|
||||
#include "global/logstream.h"
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#endif
|
||||
|
@ -102,7 +102,7 @@ public:
|
|||
Char(AsciiChar c)
|
||||
: m_ch(c.unicode()) {}
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
Char(QChar c)
|
||||
: m_ch(c.unicode()) {}
|
||||
operator QChar() const {
|
||||
|
@ -197,7 +197,7 @@ public:
|
|||
String(const Char& ch);
|
||||
String(const Char* unicode, size_t size = mu::nidx);
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
String(const QString& str) { *this = fromQString(str); }
|
||||
operator QString() const {
|
||||
return this->toQString();
|
||||
|
@ -366,7 +366,7 @@ public:
|
|||
bool removeAll(const String& str);
|
||||
void removeAt(size_t i);
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
StringList(const QStringList& l);
|
||||
QStringList toQStringList() const;
|
||||
#endif
|
||||
|
@ -389,7 +389,7 @@ public:
|
|||
AsciiStringView(const std::string& str)
|
||||
: m_size(str.size()), m_data(str.c_str()) {}
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
static AsciiStringView fromQLatin1String(const QLatin1String& str) { return AsciiStringView(str.latin1(), str.size()); }
|
||||
QLatin1String toQLatin1String() const { return QLatin1String(m_data, static_cast<int>(m_size)); }
|
||||
#endif
|
||||
|
|
|
@ -235,14 +235,14 @@ bool Val::operator <(const Val& v) const
|
|||
case Type::String: return toString() < v.toString();
|
||||
case Type::List: return toList() < v.toList();
|
||||
case Type::Map: return toMap() < v.toMap();
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
case Type::Color: return toString() < v.toString();
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
Val::Val(const QString& str)
|
||||
: m_val(str.toStdString()), m_type(Type::String) {}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "io/path.h"
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
#include <QString>
|
||||
#include <QColor>
|
||||
#include <QVariant>
|
||||
|
@ -52,7 +52,7 @@ public:
|
|||
String,
|
||||
List,
|
||||
Map,
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
Color
|
||||
#endif
|
||||
};
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
bool operator ==(const Val& v) const;
|
||||
bool operator <(const Val& v) const;
|
||||
|
||||
#ifndef GLOBAL_NO_QT_SUPPORT
|
||||
#ifndef NO_QT_SUPPORT
|
||||
explicit Val(const QString& str);
|
||||
explicit Val(const QColor& color);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "engraving/compat/mscxcompat.h"
|
||||
#include "engraving/compat/scoreaccess.h"
|
||||
#include "engraving/compat/writescorehook.h"
|
||||
#include "engraving/infrastructure/io/localfileinfoprovider.h"
|
||||
#include "engraving/io/localfileinfoprovider.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "config.h"
|
||||
#include "libmscore/masterscore.h"
|
||||
#include "libmscore/musescoreCore.h"
|
||||
#include "engraving/infrastructure/io/localfileinfoprovider.h"
|
||||
#include "engraving/io/localfileinfoprovider.h"
|
||||
|
||||
#include "engraving/compat/mscxcompat.h"
|
||||
#include "engraving/compat/scoreaccess.h"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "engraving/compat/mscxcompat.h"
|
||||
#include "engraving/compat/scoreaccess.h"
|
||||
#include "engraving/compat/writescorehook.h"
|
||||
#include "engraving/infrastructure/io/localfileinfoprovider.h"
|
||||
#include "engraving/io/localfileinfoprovider.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
|
||||
#include "project/inotationreadersregister.h"
|
||||
#include "internal/guitarproreader.h"
|
||||
|
||||
#ifndef IEX_GUITARPRO_NO_INTERNAL
|
||||
#include "internal/guitarproconfiguration.h"
|
||||
#endif
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include "realfn.h"
|
||||
#include "translation.h"
|
||||
#include "interactive/messagebox.h"
|
||||
|
||||
#include "rw/xml.h"
|
||||
#include "types/typesconv.h"
|
||||
|
@ -3027,13 +3026,6 @@ static Score::FileError importScore(MasterScore* score, mu::io::IODevice* io)
|
|||
return Score::FileError::FILE_BAD_FORMAT;
|
||||
}
|
||||
if (readResult == false) {
|
||||
/*
|
||||
if (!MScore::noGui) {
|
||||
MessageBox::warning(mu::trc("iex_guitarpro", "Import Guitar Pro"),
|
||||
mu::qtrc("iex_guitarpro", "Import failed: %1").arg(gp->error(errNo)).toStdString(),
|
||||
{ MessageBox::Ok });
|
||||
}
|
||||
*/
|
||||
LOGD("guitar pro import error====");
|
||||
// avoid another error message box
|
||||
return Score::FileError::FILE_NO_ERROR;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "engraving/compat/mscxcompat.h"
|
||||
#include "engraving/compat/scoreaccess.h"
|
||||
#include "engraving/compat/writescorehook.h"
|
||||
#include "engraving/infrastructure/io/localfileinfoprovider.h"
|
||||
#include "engraving/io/localfileinfoprovider.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "engraving/compat/mscxcompat.h"
|
||||
#include "engraving/compat/scoreaccess.h"
|
||||
#include "engraving/compat/writescorehook.h"
|
||||
#include "engraving/infrastructure/io/localfileinfoprovider.h"
|
||||
#include "engraving/io/localfileinfoprovider.h"
|
||||
|
||||
#include "importexport/musicxml/internal/musicxml/exportxml.h"
|
||||
|
||||
|
|
|
@ -104,11 +104,11 @@ bool mu::ipc::readFromSocket(QLocalSocket* socket, std::function<void(const QByt
|
|||
|
||||
auto readPackage = [socket, &stream, onPackageRead]() {
|
||||
QByteArray data;
|
||||
quint32 remaining;
|
||||
uint32_t remaining;
|
||||
stream >> remaining;
|
||||
data.resize(remaining);
|
||||
|
||||
qint64 available = socket->bytesAvailable();
|
||||
int64_t available = socket->bytesAvailable();
|
||||
if (available < remaining) {
|
||||
if (!socket->waitForReadyRead(ipc::TIMEOUT_MSEC)) {
|
||||
LOGE() << "failed read, remaining: " << remaining << ", available: " << available << ", err: " << socket->errorString();
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "engraving/rw/xml.h"
|
||||
#include "draw/types/pen.h"
|
||||
#include "draw/types/painterpath.h"
|
||||
#include "engraving/infrastructure/internal/qmimedataadapter.h"
|
||||
#include "engraving/internal/qmimedataadapter.h"
|
||||
|
||||
#include "libmscore/masterscore.h"
|
||||
#include "libmscore/page.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "stringutils.h"
|
||||
#include "framework/global/xmlreader.h"
|
||||
#include "engraving/infrastructure/io/mscreader.h"
|
||||
#include "engraving/io/mscreader.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "engraving/engravingproject.h"
|
||||
#include "engraving/compat/scoreaccess.h"
|
||||
#include "engraving/compat/mscxcompat.h"
|
||||
#include "engraving/infrastructure/io/mscio.h"
|
||||
#include "engraving/io/mscio.h"
|
||||
#include "engraving/engravingerrors.h"
|
||||
#include "engraving/style/defaultstyle.h"
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "inotationwritersregister.h"
|
||||
|
||||
#include "engraving/engravingproject.h"
|
||||
#include "engraving/infrastructure/io/ifileinfoprovider.h"
|
||||
#include "engraving/io/ifileinfoprovider.h"
|
||||
|
||||
#include "notation/internal/masternotation.h"
|
||||
#include "projectaudiosettings.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "defer.h"
|
||||
#include "notation/notationerrors.h"
|
||||
#include "projectconfiguration.h"
|
||||
#include "engraving/infrastructure/io/mscio.h"
|
||||
#include "engraving/io/mscio.h"
|
||||
#include "engraving/engravingerrors.h"
|
||||
|
||||
#include "log.h"
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include "../iprojectaudiosettings.h"
|
||||
|
||||
#include "ret.h"
|
||||
#include "engraving/infrastructure/io/mscreader.h"
|
||||
#include "engraving/infrastructure/io/mscwriter.h"
|
||||
#include "engraving/io/mscreader.h"
|
||||
#include "engraving/io/mscwriter.h"
|
||||
|
||||
namespace mu::project {
|
||||
class ProjectAudioSettings : public IProjectAudioSettings
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#ifndef MU_PROJECT_PROJECTFILEINFOPROVIDER_H
|
||||
#define MU_PROJECT_PROJECTFILEINFOPROVIDER_H
|
||||
|
||||
#include "engraving/infrastructure/io/ifileinfoprovider.h"
|
||||
#include "engraving/io/ifileinfoprovider.h"
|
||||
|
||||
#include "modularity/ioc.h"
|
||||
#include "io/ifilesystem.h"
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include "../iprojectviewsettings.h"
|
||||
|
||||
#include "ret.h"
|
||||
#include "engraving/infrastructure/io/mscreader.h"
|
||||
#include "engraving/infrastructure/io/mscwriter.h"
|
||||
#include "engraving/io/mscreader.h"
|
||||
#include "engraving/io/mscwriter.h"
|
||||
|
||||
namespace mu::project {
|
||||
class ProjectViewSettings : public IProjectViewSettings
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "dataformatter.h"
|
||||
#include "io/fileinfo.h"
|
||||
|
||||
#include "engraving/infrastructure/io/mscio.h"
|
||||
#include "engraving/io/mscio.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -43,12 +43,7 @@ set(THIRDPARTY_DIR ${MU_ROOT}/thirdparty)
|
|||
|
||||
add_definitions(
|
||||
-DNO_QT_SUPPORT
|
||||
-DGLOBAL_NO_QT_SUPPORT
|
||||
-DGLOBAL_NO_INTERNAL
|
||||
-DENGRAVING_NO_INTERACTIVE
|
||||
-DENGRAVING_NO_QSVGRENDER
|
||||
-DENGRAVING_NO_QTEXTDOCUMENT
|
||||
-DENGRAVING_NO_ACCESSIBILITY
|
||||
#-DHAW_LOGGER_QT_SUPPORT
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue