Qt6: use new QSqlField constructor with QMetaType#4376
Merged
uklotzde merged 1 commit intomixxxdj:mainfrom Oct 12, 2021
Merged
Conversation
Be-ing
commented
Oct 12, 2021
| #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) | ||
| m_stringField("string", QMetaType(QMetaType::QString)) { | ||
| #else | ||
| m_stringField("string", QVariant::String){ |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| m_stringField("string", QVariant::String){ | |
| m_stringField("string", QVariant::String) { |
pre-commit insists on removing the space here... whatever 🤷
Contributor
There was a problem hiding this comment.
m_stringField("string",
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QMetaType(QMetaType::QString)
#else
QVariant::String
#endif
) {
or otherwise try to move only the opening curly brace outside of the #ifdef.
uklotzde
suggested changes
Oct 12, 2021
| #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) | ||
| m_stringField("string", QMetaType(QMetaType::QString)) { | ||
| #else | ||
| m_stringField("string", QVariant::String){ |
Contributor
There was a problem hiding this comment.
m_stringField("string",
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QMetaType(QMetaType::QString)
#else
QVariant::String
#endif
) {
or otherwise try to move only the opening curly brace outside of the #ifdef.
[56/585] Building CXX object CMakeFiles/mixxx-lib.dir/src/dialog/dlgreplacecuecolor.cpp.o
In file included from ../src/dialog/dlgreplacecuecolor.cpp:12:
../src/library/queryutil.h: In constructor ‘FieldEscaper::FieldEscaper(const QSqlDatabase&)’:
../src/library/queryutil.h:77:15: warning: ‘QSqlField::QSqlField(const QString&, QVariant::Type, const QString&)’ is deprecated: Use the constructor using a QMetaType instead [-Wdeprecated-declarations]
77 | m_stringField("string", QVariant::String) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt6/QtSql/QtSql:9,
from ../src/library/queryutil.h:4,
from ../src/dialog/dlgreplacecuecolor.cpp:12:
/usr/include/qt6/QtSql/qsqlfield.h:85:5: note: declared here
85 | QSqlField(const QString& fieldName, QVariant::Type type, const QString &tableName = QString())
| ^~~~~~~~~
2037f73 to
079f7cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.