Fix compilation on gcc

This commit is contained in:
Rasmus Karlsson 2018-04-30 20:35:01 +02:00
parent 13f1caa294
commit b907bf5639
3 changed files with 6 additions and 7 deletions

View file

@ -12,12 +12,11 @@ namespace twitch {
class TwitchServer final : public irc::AbstractIrcServer
{
public:
TwitchServer();
friend class Application;
void initialize();
public:
// fourtf: ugh
void forEachChannelAndSpecialChannels(std::function<void(ChannelPtr)> func);

View file

@ -66,7 +66,7 @@ public:
TVectorItem item = this->vector[index];
this->vector.erase(this->vector.begin() + index);
ItemArgs args{item, index, caller};
typename ReadOnlySignalVector<TVectorItem>::ItemArgs args{item, index, caller};
this->itemRemoved.invoke(args);
}
};
@ -82,7 +82,7 @@ public:
this->vector.insert(this->vector.begin() + index, item);
ItemArgs args{item, index, caller};
typename ReadOnlySignalVector<TVectorItem>::ItemArgs args{item, index, caller};
this->itemInserted.invoke(args);
}
@ -103,7 +103,7 @@ public:
int index = this->vector.insert(
std::lower_bound(this->vector.begin(), this->vector.end(), item), item) -
this->vector.begin();
ItemArgs args{item, index, caller};
typename ReadOnlySignalVector<TVectorItem>::ItemArgs args{item, index, caller};
this->itemInserted.invoke(args);
}
};

View file

@ -26,7 +26,7 @@ public:
{
this->vector = vec;
auto insert = [this](const BaseSignalVector<TVectorItem>::ItemArgs &args) {
auto insert = [this](const typename BaseSignalVector<TVectorItem>::ItemArgs &args) {
std::vector<QStandardItem *> items;
for (int i = 0; i < this->_columnCount; i++) {
items.push_back(new QStandardItem());
@ -43,7 +43,7 @@ public:
int i = 0;
for (const TVectorItem &item : vec->getVector()) {
BaseSignalVector<TVectorItem>::ItemArgs args{item, i++, 0};
typename BaseSignalVector<TVectorItem>::ItemArgs args{item, i++, 0};
insert(args);
}