Skip to content
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

Qt 6 compatibility #1304

Open
pbek opened this issue Oct 8, 2019 · 23 comments
Open

Qt 6 compatibility #1304

pbek opened this issue Oct 8, 2019 · 23 comments

Comments

@pbek
Copy link
Owner

@pbek pbek commented Oct 8, 2019

Lots of deprecation warnings will be fixed to further advance the Qt 6 compatibility of QOwnNotes.

@pbek
Copy link
Owner Author

@pbek pbek commented Oct 8, 2019

19.10.2

  • fixed several deprecation warnings to further advance the Qt 6 compatibility
    of QOwnNotes

pbek added a commit that referenced this issue Oct 8, 2019
pbek added a commit that referenced this issue Oct 8, 2019
pbek added a commit that referenced this issue Oct 8, 2019
pbek added a commit that referenced this issue Oct 8, 2019
@Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented Oct 9, 2019

I was compiling the code yesterday and was wondering why there are so many deprecation warnings left standing.

@pbek
Copy link
Owner Author

@pbek pbek commented Oct 9, 2019

Why were you wondering?

pbek added a commit that referenced this issue Oct 9, 2019
pbek added a commit that referenced this issue Oct 9, 2019
@pbek
Copy link
Owner Author

@pbek pbek commented Oct 9, 2019

19.10.3

  • fixed several more deprecation warnings to further advance the Qt 6 compatibility
    of QOwnNotes in the future

@Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented Oct 9, 2019

Oh, just cause I thought I wouldn't encounter that. I was going to make an issue about this till I saw this Issue.

@pbek
Copy link
Owner Author

@pbek pbek commented Oct 9, 2019

Oh, just cause I thought I wouldn't encounter that. I was going to make an issue about this till I saw this Issue.

I didn't wrote that the effort to make the App work with old Qt versions as low as Qt 5.3 and have no deprecation warnings with Qt 5.13.1 was already done. A lot of stuff in the App plus all the library needed and needs to be rewritten, this takes time. 😄

@Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented Oct 9, 2019

I understand. 👍 I will try to help 😄

@pbek
Copy link
Owner Author

@pbek pbek commented Oct 9, 2019

Thank you 😃. I think all is done but the botan library, but I wonder if I it isn't better to make an effort to get botan 2 running (see #1263), so if you want to help #1263 is a good place to start. 😁

@Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented Oct 9, 2019

I will take a look at it and definitely try to make an effort 👓

@pbek
Copy link
Owner Author

@pbek pbek commented Oct 10, 2019

19.10.4

  • fixed deprecation warnings of Botan library for encrypting notes

@pbek pbek closed this Oct 10, 2019
pbek added a commit that referenced this issue Feb 3, 2021
pbek added a commit that referenced this issue Feb 4, 2021
pbek added a commit that referenced this issue Feb 4, 2021
pbek added a commit that referenced this issue Feb 5, 2021
@pbek pbek reopened this Apr 9, 2021
@pbek pbek changed the title Deprecation fixes for Qt 6 compatibility Qt 6 compatibility Apr 9, 2021
pbek added a commit that referenced this issue Apr 9, 2021
pbek added a commit that referenced this issue Apr 9, 2021
pbek added a commit that referenced this issue Apr 9, 2021
pbek pushed a commit that referenced this issue Apr 11, 2021
* qt6: use QStringRef / QStringView as required

* Make tests pass

* limit QStringView to Qt 5.15

* Fix minor Qt6 compile errors

* qsizetype fixes
pbek pushed a commit to pbek/qt-piwik-tracker that referenced this issue Apr 11, 2021
* Remove deprectated toString()

* Update piwiktracker.cpp
pbek added a commit that referenced this issue Apr 11, 2021
pbek pushed a commit that referenced this issue Apr 12, 2021
* Disable xmlpatterns and co. for Qt-6

* No explicit redirect needed in qt6
pbek added a commit that referenced this issue Apr 16, 2021
@pbek
Copy link
Owner Author

@pbek pbek commented Apr 16, 2021

https://build.opensuse.org/package/live_build_log/home:pbek:QOwnNotes/desktop/Debian_8.0/i586

@Waqar144, seems like some things got broken in older versions of Qt 😉

[  139s] helpers/codetohtmlconverter.cpp: In member function 'QString CodeToHtmlConverter::xmlHighlighter(StringView) const':
[  139s] helpers/codetohtmlconverter.cpp:521:77: error: no matching function for call to 'QRegularExpression::globalMatch(const QStringRef&)'
[  139s]                  QRegularExpressionMatchIterator matchIt = re.globalMatch(tag);
[  139s]                                                                              ^
[  139s] helpers/codetohtmlconverter.cpp:521:77: note: candidate is:
[  139s] In file included from ../../../include/i386-linux-gnu/qt5/QtCore/QRegularExpression:1:0,
[  139s]                  from helpers/codetohtmlconverter.cpp:4:
[  139s] ../../../include/i386-linux-gnu/qt5/QtCore/qregularexpression.h:120:37: note: QRegularExpressionMatchIterator QRegularExpression::globalMatch(const QString&, int, QRegularExpression::MatchType, QRegularExpression::MatchOptions) const
[  139s]      QRegularExpressionMatchIterator globalMatch(const QString &subject,
[  139s]                                      ^
[  139s] ../../../include/i386-linux-gnu/qt5/QtCore/qregularexpression.h:120:37: note:   no known conversion for argument 1 from 'const QStringRef' to 'const QString&'

@Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented Apr 16, 2021

Things that can be done for Qt6 right now

  • Move away from QStringRef for Qt6. Either use QString or QStringView.
  • Move away from QRegExp to QRegularExpression. Not all older Qt API supports it properly so this will probably need a lot #ifdefs . Some third party libraries use it extensively and most of them are not being actively maintained so it will be upto us to fix this I guess.
  • Move away from qmake. It may get removed? and cmake seems to be the future
  • QWebSockets is not available yet, It is unclear when it will be available. That is necessary for browser extensions I think
  • No explicit x11extras modules for Qt6. QHotKey depends on this
  • No xmlpatterns in Qt6. This is used in importing evernote notes and to a small extent in OwnCloud code. Not clear what to do yet
    • Bring a third party library for this?? ALL third party xmlpattern libraries are huge.
    • Write a custom parser for just what we need and skip a dependency?
  • QTextCodec is gone. We need to work around this as well.
  • Fix all deprecation warnings, they are errors in Qt6

pbek pushed a commit that referenced this issue Apr 16, 2021
@pbek
Copy link
Owner Author

@pbek pbek commented Apr 16, 2021

Quite the list!

@Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented Apr 16, 2021

Let's hope this is all ;p

We can start slow. Do the things that are possible for now, and wait for the rest.

@pbek
Copy link
Owner Author

@pbek pbek commented Apr 16, 2021

Thank you for your research and the ongoing fixes!

@pbek
Copy link
Owner Author

@pbek pbek commented Apr 20, 2021

@pbek
Copy link
Owner Author

@pbek pbek commented Apr 21, 2021

pbek pushed a commit that referenced this issue Apr 21, 2021
@pbek
Copy link
Owner Author

@pbek pbek commented Apr 22, 2021

pbek pushed a commit that referenced this issue Apr 23, 2021
@pbek
Copy link
Owner Author

@pbek pbek commented Apr 25, 2021

@pbek
Copy link
Owner Author

@pbek pbek commented Apr 27, 2021

@Waqar144, Fedora 33 really behaves strange. It should use Qt 5.15.2. Maybe the OBS builder uses something earlier, like 5.15.1 or 5.15.0?

Do you use the new Qt 5.15.2 methods from https://doc.qt.io/qt-5/qstringview.html or can we start with 5.15.0, instead of 5.15.2 in helpers/codetohtmlconverter.h:13?

pbek pushed a commit that referenced this issue May 2, 2021
@pbek
Copy link
Owner Author

@pbek pbek commented May 4, 2021

@Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented May 4, 2021

@pbek
Copy link
Owner Author

@pbek pbek commented May 4, 2021

For xmlpatterns, can we do it manually somehow?

you mean migrate away from it?

pbek added a commit that referenced this issue May 5, 2021
pbek added a commit that referenced this issue May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants