Fix some compilation warnings

This commit is contained in:
Jack Andersen 2019-04-06 18:59:49 -10:00
parent aeaba9366d
commit 1b10016369
6 changed files with 4 additions and 21 deletions

View File

@ -40,8 +40,6 @@ bool MkPath(const QDir& dir, const QString& file, UIMessenger& messenger);
void ShowInGraphicalShell(QWidget* parent, const QString& pathIn);
QString ShowInGraphicalShellString();
static QLatin1String StringViewToQString(std::string_view sv) { return QLatin1String(sv.data(), int(sv.size())); }
/* Used for generating transform matrices to map SVG coordinate space */
QTransform RectToRect(const QRectF& from, const QRectF& to);

View File

@ -1352,8 +1352,8 @@ MIDIPlayerWidget::~MIDIPlayerWidget() {
MIDIPlayerWidget::MIDIPlayerWidget(QModelIndex index, amuse::GroupId gid, amuse::SongId id, const QString& path,
QWidget* parent)
: QWidget(parent)
, m_button(this)
, m_playAction(tr("Play"))
, m_button(this)
, m_index(index)
, m_groupId(gid)
, m_songId(id)

View File

@ -551,7 +551,7 @@ SFXPlayerWidget::~SFXPlayerWidget() {
}
SFXPlayerWidget::SFXPlayerWidget(QModelIndex index, amuse::GroupId gid, amuse::SFXId id, QWidget* parent)
: QWidget(parent), m_button(this), m_playAction(tr("Play")), m_index(index), m_groupId(gid), m_sfxId(id) {
: QWidget(parent), m_playAction(tr("Play")), m_button(this), m_index(index), m_groupId(gid), m_sfxId(id) {
m_playAction.setIcon(QIcon(QStringLiteral(":/icons/IconSoundMacro.svg")));
m_button.setDefaultAction(&m_playAction);
connect(&m_playAction, SIGNAL(triggered()), this, SLOT(clicked()));

View File

@ -199,7 +199,7 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd, amus
case amuse::SoundMacro::CmdIntrospection::Field::Type::SoundMacroId:
case amuse::SoundMacro::CmdIntrospection::Field::Type::TableId:
case amuse::SoundMacro::CmdIntrospection::Field::Type::SampleId: {
ProjectModel::INode::Type collectionType;
ProjectModel::INode::Type collectionType = ProjectModel::INode::Type::Null;
if (field.m_tp == amuse::SoundMacro::CmdIntrospection::Field::Type::SoundMacroId) {
collectionType = ProjectModel::INode::Type::SoundMacro;
} else if (field.m_tp == amuse::SoundMacro::CmdIntrospection::Field::Type::TableId) {

View File

@ -443,7 +443,7 @@
</message>
<message>
<location filename="../SongGroupEditor.cpp" line="1324"/>
<location filename="../SongGroupEditor.cpp" line="1356"/>
<location filename="../SongGroupEditor.cpp" line="1355"/>
<source>Play</source>
<translation type="unfinished"></translation>
</message>

View File

@ -8,21 +8,6 @@
static logvisor::Module Log("amuseplay");
#if __GNUC__
__attribute__((__format__(__printf__, 3, 4)))
#endif
static inline void
SNPrintf(boo::SystemChar* str, size_t maxlen, const boo::SystemChar* format, ...) {
va_list va;
va_start(va, format);
#if _WIN32
_vsnwprintf(str, maxlen, format, va);
#else
vsnprintf(str, maxlen, format, va);
#endif
va_end(va);
}
struct AppCallback;
struct EventCallback : boo::IWindowCallback {