-
Notifications
You must be signed in to change notification settings - Fork 195
a lot of housekeeping #413
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
Conversation
psieg
left a comment
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.
Thanks, just a few small notes
| int count = QGuiApplication::screens().count(); | ||
|
|
||
| result = QString("%1%2\r\n").arg(CmdResultCountMonitor).arg(count); | ||
| result = QStringLiteral("%1%2\r\n").arg(CmdResultCountMonitor).arg(count); |
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.
When did you swtich to .arg(x,y) and when stick to .arg(X).arg(Y) ?
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.
(QString1, QString2...) (up to 9 i think)
arg(type1).arg(type2)... which is probably equal to (QString(type1), QString(type2)...) allocation wise
| virtual ~LedDeviceAlienFx(); | ||
| QString name() const { return QStringLiteral("lightfx"); } | ||
| int maxLedsCount(); | ||
| int defaultLedsCount() { return 1; } |
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.
just curious, why is the maxLedsCounts in the code file but the defaultLedsCount in the header?
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.
to avoid adding enum header
I ran the build through clazy and it highlighted a lot of small things (still does) to improve
here are most of those things:
QStringLiteral(compile timeQStringbasically)also apparently doing this through
FLAGSdoes not work well becauseqmakewould still append whatever the default is frommkspec, so changing this viaCONFIGsolves thatconstsstd::chrono_literalsforQTimersQList::reserve()where possibleAfter that I tried building with Qt6 RC, and after some minor massaging it worked
QSettingsassumes utf-8 now, so no need forsetIniCodec()(which is dropped from core anyway)QRegExp*isQRegularExpression*nowQListworks slightly differently now and does not like forward declarations for item typesI'm not sure if there's more to be done for this part given what they say (like is it leaking as is or...)
but just by itself this PR has like 95% of the above (so just this would not build with Qt6 for ex)
once all 3 are merged, another quick pass would be needed (this one should probably go first)
while dealing with slots and signals I did some device refactoring, mostly de-copypasta'd UDP, and fixed couple of small things on the way
there's a lot more to do there, but that'll wait another time
and finally, removed remaining
QDekstopWidgetusage which I started doing a while ago with some deprecations, but at the time they were saying "use these other classes/methods" which themselves usedQDekstopWidgetbut were not flagged as deprecated for some reason and now everything gets removed in Qt6...these changes seem to work, but I can't test multiple displays
otherwise this builds and runs on all 3 platforms