From d48cda9dca71f34cae07d2da37d39c16c19a68f0 Mon Sep 17 00:00:00 2001 From: SeeLook <SeeLook@localhost> Date: Thu, 4 Jan 2018 21:58:54 +0100 Subject: [PATCH] Change method param type, add missing library macro (Win complains) --- src/libs/core/taction.h | 3 ++- src/main/tnameitem.cpp | 38 +++++++++++++++++++------------------- src/main/tnameitem.h | 34 +++++++++++++++++----------------- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/src/libs/core/taction.h b/src/libs/core/taction.h index 40de1997f..98787128c 100644 --- a/src/libs/core/taction.h +++ b/src/libs/core/taction.h @@ -20,6 +20,7 @@ #define TACTION_H +#include <nootkacoreglobal.h> #include <QtCore/qobject.h> @@ -30,7 +31,7 @@ * Also it keeps QML @p Shortcut through @p QObject, * so if @p shortcut() is set, @p key() returns its text representation */ -class Taction : public QObject +class NOOTKACORE_EXPORT Taction : public QObject { Q_OBJECT diff --git a/src/main/tnameitem.cpp b/src/main/tnameitem.cpp index 086186952..7c27af49b 100644 --- a/src/main/tnameitem.cpp +++ b/src/main/tnameitem.cpp @@ -1,20 +1,20 @@ /*************************************************************************** -* Copyright (C) 2017 by Tomasz Bojczuk * -* seelook@gmail.com * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 3 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program. If not, see <http://www.gnu.org/licenses/>. * -***************************************************************************/ + * Copyright (C) 2017-2018 by Tomasz Bojczuk * + * seelook@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ #include "tnameitem.h" #include <tglobals.h> @@ -202,17 +202,17 @@ QString TnameItem::octavesLink() const { * Text on name buttons depends on style */ QString TnameItem::noteButtonText(int noteNr, int nStyle) { - return Tnote(noteNr, 0, 0).toText(static_cast<Tnote::EnameStyle>(nStyle), false); + return Tnote(static_cast<char>(noteNr), 0, 0).toText(static_cast<Tnote::EnameStyle>(nStyle), false); } -void TnameItem::askQuestion(const Tnote& note, Tnote::EnameStyle questStyle, char strNr) { +void TnameItem::askQuestion(const Tnote& note, Tnote::EnameStyle questStyle, quint8 strNr) { changeNameBgColor(Tcolor::merge(Tcolor::alpha(GLOB->EquestionColor, 40), qApp->palette().base().color())); setNameStyle(questStyle); setNote(note); m_appendix.clear(); if (strNr > 0) - m_appendix = QString::number(static_cast<int>(strNr)); + m_appendix = QString::number(strNr); m_appendix += QLatin1String("?"); emit appendixChanged(); } diff --git a/src/main/tnameitem.h b/src/main/tnameitem.h index 63d84dfd5..9fc4ffd67 100644 --- a/src/main/tnameitem.h +++ b/src/main/tnameitem.h @@ -1,20 +1,20 @@ /*************************************************************************** -* Copyright (C) 2017 by Tomasz Bojczuk * -* seelook@gmail.com * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 3 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program. If not, see <http://www.gnu.org/licenses/>. * -***************************************************************************/ + * Copyright (C) 2017-2018 by Tomasz Bojczuk * + * seelook@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ #ifndef TNAMEOBJECT_H #define TNAMEOBJECT_H @@ -88,7 +88,7 @@ public: Q_INVOKABLE QString octavesLink() const; Q_INVOKABLE QString noteButtonText(int noteNr, int nStyle = -1); - void askQuestion(const Tnote& note, Tnote::EnameStyle questStyle, char strNr = 0); + void askQuestion(const Tnote& note, Tnote::EnameStyle questStyle, quint8 strNr = 0); void prepareAnswer(Tnote::EnameStyle answStyle); -- GitLab