aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-open
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-06-08 16:17:29 -0400
committerKen Moore <moorekou@gmail.com>2016-06-08 16:17:29 -0400
commitbef675d06c3014a76073027368bd96138be4bb1d (patch)
tree4841e6a1394f7f189fded1577715597292b40326 /src-qt5/core/lumina-open
parentUpdate lumina-xconfig (and lumina-session) so that it saves/reloads the previ... (diff)
downloadlumina-bef675d06c3014a76073027368bd96138be4bb1d.tar.gz
lumina-bef675d06c3014a76073027368bd96138be4bb1d.tar.bz2
lumina-bef675d06c3014a76073027368bd96138be4bb1d.zip
Fix a bug with detecting/using KDE applications as the defaults for particular mimetypes.
Diffstat (limited to 'src-qt5/core/lumina-open')
-rw-r--r--src-qt5/core/lumina-open/LFileDialog.cpp4
-rw-r--r--src-qt5/core/lumina-open/main.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-open/LFileDialog.cpp b/src-qt5/core/lumina-open/LFileDialog.cpp
index c0417935..e5fbc874 100644
--- a/src-qt5/core/lumina-open/LFileDialog.cpp
+++ b/src-qt5/core/lumina-open/LFileDialog.cpp
@@ -46,6 +46,7 @@ void LFileDialog::setFileInfo(QString filename, QString extension, bool isFile){
//static functions
QString LFileDialog::getDefaultApp(QString extension){
+ qDebug() << "Get Default App:" << extension;
QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
if(extension.contains("/")){
return LXDG::findDefaultAppForMime(extension);
@@ -66,7 +67,7 @@ void LFileDialog::setDefaultApp(QString extension, QString appFile){
}else{
QSettings("LuminaDE", "lumina-open").setValue("default/"+extension,appFile);
}
- }
+ }
}
// -----------
@@ -283,4 +284,3 @@ void LFileDialog::on_tool_findBin_clicked(){
void LFileDialog::on_line_bin_textChanged(){
updateUI();
}
-
diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp
index a323e075..7011b2e1 100644
--- a/src-qt5/core/lumina-open/main.cpp
+++ b/src-qt5/core/lumina-open/main.cpp
@@ -101,6 +101,7 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS
//qDebug() << "Matches:" << matches;
for(int i=0; i<matches.length(); i++){
defApp = LXDG::findDefaultAppForMime(matches[i]);
+ //qDebug() << "MimeType:" << matches[i] << defApp;
if(!defApp.isEmpty()){ extension = matches[i]; break; }
else if(i+1==matches.length()){ extension = matches[0]; }
}
bgstack15