-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow build with qt6 #8
base: master
Are you sure you want to change the base?
Conversation
@@ -1059,7 +1059,7 @@ bool DatabaseIO::getGroups(const QString &localUid, const QString &remoteUid, QL | |||
if (!remoteUid.isEmpty()) | |||
q += "Groups.remoteUids = :remoteUid "; | |||
} | |||
q += "GROUP BY Groups.id " + queryOrder; | |||
q += QString("GROUP BY Groups.id " + queryOrder).toUtf8(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to create a string from the whole thing, and better if not needing to use QString(char*). Just do "... + queryOrder.toUtf8()".
@@ -36,7 +36,11 @@ void RecipientEventModelTest::initTestCase() | |||
{ | |||
initTestDatabase(); | |||
|
|||
qsrand(QDateTime::currentDateTime().toTime_t()); | |||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) | |||
srand( QDateTime::currentDateTime().toSecsSinceEpoch() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why seed srand() since rand() isn't used here? If Qt api is used for random number, qt api should be seeded.
Same issue on multiple places.
bool randomRemote = true; | ||
if (arguments.count() > 3) { | ||
remoteUid = arguments.at(3); | ||
randomRemote = false; | ||
} | ||
|
||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) | ||
QRandomGenerator qrand; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd avoid qrand as name since that's used on qt side too. But then again I don't think there's need to declare such an instance at all, could instead just use "QRandomGenerator::global()->generate()" instead of qrand()?
Applies to lot of places.
@@ -21,5 +21,6 @@ | |||
############################################################################### | |||
|
|||
TEMPLATE = subdirs | |||
CONFIG += ORDERED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as needing changes.
No description provided.