Skip to content

fixed #13238 - GUI: Fix start application with Qt6#6931

Merged
firewave merged 1 commit intocppcheck-opensource:mainfrom
luis-pereira:fix-start-application-qt6
Oct 17, 2024
Merged

fixed #13238 - GUI: Fix start application with Qt6#6931
firewave merged 1 commit intocppcheck-opensource:mainfrom
luis-pereira:fix-start-application-qt6

Conversation

@luis-pereira
Copy link
Copy Markdown
Contributor

@luis-pereira luis-pereira commented Oct 17, 2024

It doesn't work with Qt6.
Qt5 QProcess::startDetached(const QString &command) was removed and replaced with:
QProcess::startDetached(const QString &program, const QStringList &arguments = {}, const QString &workingDirectory = QString(), qint64 *pid = nullptr)

Due to Qt6 default arguments, build doesn't break but we end up feeding it the wrong arguments.

@luis-pereira
Copy link
Copy Markdown
Contributor Author

luis-pereira commented Oct 17, 2024

Open GUi tickets isn't working. I was not able to search for an already open ticket.
Force-pushed to change formatting in the commit message.

@luis-pereira luis-pereira force-pushed the fix-start-application-qt6 branch from 3c1a7b4 to 65c6b9e Compare October 17, 2024 17:50
@firewave
Copy link
Copy Markdown
Collaborator

Thanks for your contribution.

They flip-flopped on this by deprecating it in Qt5 and then no longer deprecating in Qt6 (see comment) above so I didn't pay much attention on what is actually going on here.

Having matching signatures between those two versions is obviously a really bad decision.

I also added some other comment.

@firewave firewave changed the title GUI: Fix start application with Qt6 fixed #13238 - GUI: Fix start application with Qt6 Oct 17, 2024
Comment thread gui/resultstree.cpp Outdated
@firewave
Copy link
Copy Markdown
Collaborator

firewave commented Oct 17, 2024

I tested the changes locally and can confirm that it fixes the issue. I also filed a ticket about it.

It doesn't work with Qt6.
Qt5 QProcess::startDetached(const QString &command) was removed and replaced
with:
QProcess::startDetached(const QString &program, const QStringList &arguments = {},
                        const QString &workingDirectory = QString(),
                        qint64 *pid = nullptr)

Due to Qt6 default arguments, build doesn't break but we end up feeding it
the wrong arguments.
@luis-pereira luis-pereira force-pushed the fix-start-application-qt6 branch from 65c6b9e to c94d305 Compare October 17, 2024 20:51
@firewave firewave merged commit b8c110c into cppcheck-opensource:main Oct 17, 2024
ludviggunne pushed a commit to ludviggunne/cppcheck that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants