Merge pull request #1 from pajlada/master

fix msvc compilation
This commit is contained in:
fourtf 2017-01-05 16:46:07 +01:00 committed by GitHub
commit 46b3c4805a
5 changed files with 26 additions and 6 deletions

View file

@ -84,7 +84,10 @@ HEADERS += mainwindow.h \
message.h \
word.h \
link.h \
fonts.h
fonts.h \
common.h
PRECOMPILED_HEADER = common.h
FORMS += \
dialog.ui

15
common.h Normal file
View 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

View file

@ -16,7 +16,7 @@ Emotes::Emotes()
LazyLoadedImage* Emotes::getCheerImage(long long amount, bool animated)
{
#warning "xD"
#pragma message WARN("Implement Emotes::getCheerImage")
// object image;
// if (cheer >= 100000)

View file

@ -208,7 +208,7 @@ void IrcManager::addIgnoredUser(QString const &username)
{
QString 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;
if (!tryRemoveIgnoredUser(username, errorMessage)) {
#warning "xD"
#pragma message WARN("TODO: Implement IrcManager::removeIgnoredUser")
}
}

View file

@ -3,6 +3,8 @@
#include "colorscheme.h"
#include "emotes.h"
#include <ctime>
LazyLoadedImage* Message::badgeStaff = new LazyLoadedImage(new QImage(":/images/staff_bg.png"));
LazyLoadedImage* Message::badgeAdmin = new LazyLoadedImage(new QImage(":/images/admin_bg.png"));
LazyLoadedImage* Message::badgeModerator = new LazyLoadedImage(new QImage(":/images/moderator_bg.png"));
@ -24,7 +26,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
// timestamps
auto iterator = ircMessage.tags().find("tmi-sent-ts");
time_t time = std::time(NULL);
std::time_t time = std::time(NULL);
if (iterator != ircMessage.tags().end())
{
@ -70,7 +72,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
}
// highlights
#warning "xD"
#pragma message WARN("xD")
// color
QColor usernameColor = ColorScheme::getInstance().SystemMessageColor;