[konsole] [Bug 431496] Konsole commit 5cb2121751569d8fb1e478b10e5980be4abeaa9b: all files open in defined text editor

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Wed Jan 13 15:04:43 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=431496

--- Comment #5 from rcorreia31 at gmail.com ---
Thanks for fix.
I still have an issue with the latest commit: .htm and .html files are opened
in the editor and not in the defined browser.
If I click in an html file within dolphin or krusader, the browser is opened
has expected.

Here the tests I did.
For a pdf:
. mimeType.inherits(QStringLiteral("text/plain") = 0
. mimeType.name() = application/pdf
For .htm ot .html:
. mimeType.inherits(QStringLiteral("text/plain") = 1
. mimeType.name() = text/html
For a .txt file :
. mimeType.inherits(QStringLiteral("text/plain") = 1
. mimeType.name() = text/plain

So for both .txt and .html, mimeType.inherits(QStringLiteral("text/plain")
returns 1.
It might be expected but it prevents the browser from being opened.

For the sake of trying, I changed this test:
  if (!mimeType.inherits(QStringLiteral("text/plain")) ||
mimeType.name()==QStringLiteral("text/html") ) {
Now I have the expected behavior.
As I know almost nothing about Qt C++ development, there is surely a better way
of handling this.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list