A user may have Kate installed but another editor set as default for text/plain. Respect that.
Also add .txt extension to the temp file name to make mime-type detection easier.
BUG: 399174
A user may have Kate installed but another editor set as default for text/plain. Respect that.
Also add .txt extension to the temp file name to make mime-type detection easier.
BUG: 399174
Set default text editor to Kate -> Text opens in Kate
Set default text editor to Atom -> Text opens in Atom
Lint OK |
No Unit Test Coverage |
Buildable 3287 | |
Build 3305: arc lint + arc unit |
-1 I liked that using Kate didn't require writing to a temporary file.
How about asking KMimeTypeTrader for preferred service for text/plain being Kate? (KWrite also supports --stdin btw which is more common on default installs iirc)
+1 on the file template part
plugins/share/shareplugin.cpp | ||
---|---|---|
118 | Ugh yeah, no. Extract the executable name from the server, not from the id. They may be different! |
plugins/share/shareplugin.cpp | ||
---|---|---|
115 | I think that & should go, given you may also assign temporary QString() to it | |
118 | I was about to suggest parsing Exec but this is complicated and might have additional incompatbile arguments, and it can only be "kate" and "kwrite" at this point given the if above. Could probably use the first part of Exec but imho this way is fine'ish. |
plugins/share/shareplugin.cpp | ||
---|---|---|
118 | It does contain %U, but it doesn't seem to hurt |
plugins/share/shareplugin.cpp | ||
---|---|---|
118 | It does for KWrite... |