QT6 源(23):QSet<T> 的源码阅读

(1)

(2)

谢谢

g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o main.o main.cpp g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o gamewindow.o gamewindow.cpp gamewindow.cpp: 在成员函数‘void GameWindow::loadWordLists()’中: gamewindow.cpp:143:70: 错误:对‘QSet<QString>::QSet(QVector<QString>::iterator, QVector<QString>::iterator)’的调用没有匹配的函数 m_wordSet2 = QSet<QString>(m_wordList2.begin(), m_wordList2.end()); ^ gamewindow.cpp:143:70: 附注:备选是: In file included from /usr/include/qt5/QtCore/QSet:1:0, from gamewindow.h:13, from gamewindow.cpp:1: /usr/include/qt5/QtCore/qset.h:61:12: 附注:QSet<T>::QSet(std::initializer_list<_Tp>) [with T = QString] inline QSet(std::initializer_list<T> list) ^ /usr/include/qt5/QtCore/qset.h:61:12: 附注: 备选需要 1 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:59:12: 附注:QSet<T>::QSet() [with T = QString] inline QSet() Q_DECL_NOTHROW {} ^ /usr/include/qt5/QtCore/qset.h:59:12: 附注: 备选需要 0 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:54:7: 附注:QSet<QString>::QSet(const QSet<QString>&) class QSet ^ /usr/include/qt5/QtCore/qset.h:54:7: 附注: 备选需要 1 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:54:7: 附注:QSet<QString>::QSet(QSet<QString>&&) /usr/include/qt5/QtCore/qset.h:54:7: 附注: 备选需要 1 实参,但提供了 2 个 gamewindow.cpp:144:70: 错误:对‘QSet<QString>::QSet(QVector<QString>::iterator, QVector<QString>::iterator)’的调用没有匹配的函数 m_wordSet3 = QSet<QString>(m_wordList3.begin(), m_wordList3.end()); ^ gamewindow.cpp:144:70: 附注:备选是: In file included from /usr/include/qt5/QtCore/QSet:1:0, from gamewindow.h:13, from gamewindow.cpp:1: /usr/include/qt5/QtCore/qset.h:61:12: 附注:QSet<T>::QSet(std::initializer_list<_Tp>) [with T = QString] inline QSet(std::initializer_list<T> list) ^ /usr/include/qt5/QtCore/qset.h:61:12: 附注: 备选需要 1 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:59:12: 附注:QSet<T>::QSet() [with T = QString] inline QSet() Q_DECL_NOTHROW {} ^ /usr/include/qt5/QtCore/qset.h:59:12: 附注: 备选需要 0 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:54:7: 附注:QSet<QString>::QSet(const QSet<QString>&) class QSet ^ /usr/include/qt5/QtCore/qset.h:54:7: 附注: 备选需要 1 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:54:7: 附注:QSet<QString>::QSet(QSet<QString>&&) /usr/include/qt5/QtCore/qset.h:54:7: 附注: 备选需要 1 实参,但提供了 2 个 gamewindow.cpp:145:70: 错误:对‘QSet<QString>::QSet(QVector<QString>::iterator, QVector<QString>::iterator)’的调用没有匹配的函数 m_wordSet5 = QSet<QString>(m_wordList5.begin(), m_wordList5.end()); ^ gamewindow.cpp:145:70: 附注:备选是: In file included from /usr/include/qt5/QtCore/QSet:1:0, from gamewindow.h:13, from gamewindow.cpp:1: /usr/include/qt5/QtCore/qset.h:61:12: 附注:QSet<T>::QSet(std::initializer_list<_Tp>) [with T = QString] inline QSet(std::initializer_list<T> list) ^ /usr/include/qt5/QtCore/qset.h:61:12: 附注: 备选需要 1 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:59:12: 附注:QSet<T>::QSet() [with T = QString] inline QSet() Q_DECL_NOTHROW {} ^ /usr/include/qt5/QtCore/qset.h:59:12: 附注: 备选需要 0 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:54:7: 附注:QSet<QString>::QSet(const QSet<QString>&) class QSet ^ /usr/include/qt5/QtCore/qset.h:54:7: 附注: 备选需要 1 实参,但提供了 2 个 /usr/include/qt5/QtCore/qset.h:54:7: 附注:QSet<QString>::QSet(QSet<QString>&&) /usr/include/qt5/QtCore/qset.h:54:7: 附注: 备选需要 1 实参,但提供了 2 个 gamewindow.cpp: 在成员函数‘void GameWindow::generatePuzzle()’中: gamewindow.cpp:265:17: 错误:‘QRandomGenerator’未声明 int r = QRandomGenerator::global()->bounded(GRID_SIZE); ^ gamewindow.cpp:266:17: 错误:‘QRandomGenerator’未声明 int c = QRandomGenerator::global()->bounded(GRID_SIZE); ^ gamewindow.cpp: 在成员函数‘void GameWindow::generateWithFixedPattern()’中: gamewindow.cpp:290:81: 错误:‘QRandomGenerator’未声明 QString centerColWord = centerColWords.isEmpty() ? "WORDS" : centerColWords[QRandomGenerator::global()->bounded(centerColWords.size())]; ^ gamewindow.cpp:295:66: 错误:‘QRandomGenerator’未声明 QString col0Word = col0Words.isEmpty() ? "BLOCK" : col0Words[QRandomGenerator::global()->bounded(col0Words.size())]; ^ gamewindow.cpp:299:66: 错误:‘QRandomGenerator’未声明 QString col4Word = col4Words.isEmpty() ? "DREAM" : col4Words[QRandomGenerator::global()->bounded(col4Words.size())]; ^ gamewindow.cpp: 在全局域: gamewindow.cpp:405:6: 警告:未使用的参数‘isHorizontal’ [-Wunused-parameter] bool GameWindow::isValidWord(const QString& word, bool isHorizontal) ^ gamewindow.cpp: 在成员函数‘QChar GameWindow::getRandomLetter() const’中: gamewindow.cpp:431:23: 错误:‘QRandomGenerator’未声明 return letters.at(QRandomGenerator::global()->bounded(letters.size())); ^ gamewindow.cpp:432:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type] } ^ make: *** [gamewindow.o] 错误 1
07-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhangzhangkeji

谢谢支持

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值