pinaraf / Slacken

A lightweight Qt client for Slack
GNU General Public License v3.0
25 stars 5 forks source link

Failure to build from souce #14

Closed ColumPaget closed 6 years ago

ColumPaget commented 6 years ago

Compiling with 8.1.0 and Qt 5.9.1:

slackclient.cpp: In lambda function: slackclient.cpp:88:50: error: no match for 'operator[]' (operand types are 'QJsonDocument' and 'const QString') for (const QJsonValueRef channel: doc[listPath].toArray()) { ^ slackclient.cpp: In lambda function: slackclient.cpp:112:21: error: no match for 'operator[]' (operand types are 'QJsonDocument' and 'const char [5]') selfId = doc["self"].toObject()["id"].toString(); ^ slackclient.cpp:113:25: error: no match for 'operator[]' (operand types are 'QJsonDocument' and 'const char [5]') m_teamName = doc["team"].toObject()["name"].toString(); ^ slackclient.cpp:117:43: error: no match for 'operator[]' (operand types are 'QJsonDocument' and 'const char [6]') for (const QJsonValueRef user: doc["users"].toArray()) { ^ slackclient.cpp:124:46: error: no match for 'operator[]' (operand types are 'QJsonDocument' and 'const char [9]') for (const QJsonValueRef channel: doc["channels"].toArray()) { ^ slackclient.cpp:131:46: error: no match for 'operator[]' (operand types are 'QJsonDocument' and 'const char [7]') for (const QJsonValueRef channel: doc["groups"].toArray()) { ^ slackclient.cpp:138:46: error: no match for 'operator[]' (operand types are 'QJsonDocument' and 'const char [4]') for (const QJsonValueRef channel: doc["ims"].toArray()) {

pinaraf commented 6 years ago

Hi

Indeed, thank you for the report. I used the [] operator, but I did not see it was available only with Qt ≥5.10. I can't push a fix right now, will do that in one or two hours.

pinaraf commented 6 years ago

I've pushed a fix, could you try again please ? (I don't have a Qt 5.9 available right now for testing)

pinaraf commented 6 years ago

I finished the installation of Qt 5.9, and another fix was needed. I've closed the issue since it is now working. Thanks for the report again.

ColumPaget commented 6 years ago

Hi, it builds now. Thanks for the fix!