mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
the preprocessor command #warning is not standard.
use #pragma message WARN("xD") to make it work on gcc and msvc
This commit is contained in:
parent
e68f885dff
commit
7262c11458
|
@ -84,7 +84,10 @@ HEADERS += mainwindow.h \
|
||||||
message.h \
|
message.h \
|
||||||
word.h \
|
word.h \
|
||||||
link.h \
|
link.h \
|
||||||
fonts.h
|
fonts.h \
|
||||||
|
common.h
|
||||||
|
|
||||||
|
PRECOMPILED_HEADER = common.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
dialog.ui
|
dialog.ui
|
||||||
|
|
15
common.h
Normal file
15
common.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#ifndef COMMON_H
|
||||||
|
#define COMMON_H
|
||||||
|
|
||||||
|
#define STRINGISE_IMPL(x) #x
|
||||||
|
#define STRINGISE(x) STRINGISE_IMPL(x)
|
||||||
|
|
||||||
|
// Use: #pragma message WARN("My message")
|
||||||
|
#if _MSC_VER
|
||||||
|
# define FILE_LINE_LINK __FILE__ "(" STRINGISE(__LINE__) ") : "
|
||||||
|
# define WARN(exp) (FILE_LINE_LINK "WARNING: " exp)
|
||||||
|
#else//__GNUC__ - may need other defines for different compilers
|
||||||
|
# define WARN(exp) ("WARNING: " exp)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // COMMON_H
|
|
@ -16,7 +16,7 @@ Emotes::Emotes()
|
||||||
|
|
||||||
LazyLoadedImage* Emotes::getCheerImage(long long amount, bool animated)
|
LazyLoadedImage* Emotes::getCheerImage(long long amount, bool animated)
|
||||||
{
|
{
|
||||||
#warning "xD"
|
#pragma message WARN("Implement Emotes::getCheerImage")
|
||||||
// object image;
|
// object image;
|
||||||
|
|
||||||
// if (cheer >= 100000)
|
// if (cheer >= 100000)
|
||||||
|
|
|
@ -208,7 +208,7 @@ void IrcManager::addIgnoredUser(QString const &username)
|
||||||
{
|
{
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
if (!tryAddIgnoredUser(username, errorMessage)) {
|
if (!tryAddIgnoredUser(username, errorMessage)) {
|
||||||
#warning "xD"
|
#pragma message WARN("Implement IrcManager::addIgnoredUser")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,6 +241,6 @@ void IrcManager::removeIgnoredUser(QString const &username)
|
||||||
{
|
{
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
if (!tryRemoveIgnoredUser(username, errorMessage)) {
|
if (!tryRemoveIgnoredUser(username, errorMessage)) {
|
||||||
#warning "xD"
|
#pragma message WARN("TODO: Implement IrcManager::removeIgnoredUser")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
// highlights
|
// highlights
|
||||||
#warning "xD"
|
#pragma message WARN("xD")
|
||||||
|
|
||||||
// color
|
// color
|
||||||
QColor usernameColor = ColorScheme::getInstance().SystemMessageColor;
|
QColor usernameColor = ColorScheme::getInstance().SystemMessageColor;
|
||||||
|
|
Loading…
Reference in a new issue