Errors in code for "Assigning a file type to an Application on Windows". Which is provided by Qt wiki in "https://wiki.qt.io/".
-
[https://wiki.qt.io/Assigning_a_file_type_to_an_Application_on_Windows](link url mentioned below)
The code of the upper link has a bunch of problems. It's about "Assigning a file type to a Qt application on windows".
It has a warning in "explicit DocumentWindow()" function, bugs in "DocumentWindow::ddeInitiate()", "bool DocumentWindow::SetHkcrUserRegKey()", "void DocumentWindow::executeDdeCommand()" and "bool DocumentWindow::winEvent()" function.
I am requesting to solve those problems. Thanks for your kind concern! -
@Saad02 said in Errors in code for "Assigning a file type to an Application on Windows". Which is provided by Qt wiki in "https://wiki.qt.io/".:
I am requesting to solve those problems.
You can do it too - everyone can edit a this wiki.
It has a warning in "explicit DocumentWindow()" function, bugs in "DocumentWindow::ddeInitiate()", "bool DocumentWindow::SetHkcrUserRegKey()", "void DocumentWindow::executeDdeCommand()" and "bool DocumentWindow::winEvent()" function.
Maybe you simply can tell us what exactly is wrong and/or fix it directly by yourself when you already know what's wrong.
-
To quote the wiki page, "You may use this code without any warranty. "
The code is from 2011, when Qt 4 was the latest. Attempting to compile the Git code with Qt 5 or 6 will not work as-is. The error in DocumentWindow::winEvent() is simply because Qt5 changed the API and removed QPaintDevice::winEvent() (and by inheritance from QWidget and QMainWindow). Look at QWidget::nativeEvent() when you are porting.
There are a few typos in the Wiki page source code and a now broken link to the source on Gitorious.
Gitorious ceased to be in 2015 when taken over by Gitlab. The source still exists there. The simple typos are not present in the Git sources.When you have finished porting to Qt5 and Qt6 feel free to update the wiki page with code that uses include guards to handle version differences.