Browse Source

Only copy to .DirIcon if it does not exist yet

master
probonopd 8 years ago
parent
commit
6e8bdab10f
  1. 8
      linuxdeployqt/main.cpp

8
linuxdeployqt/main.cpp

@ -285,19 +285,19 @@ int main(int argc, char **argv)
QString preExistingToplevelIcon = "";
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".xpm").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".xpm";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".svgz").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".svgz";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".svg").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".svg";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".png").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".png";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(preExistingToplevelIcon != ""){

Loading…
Cancel
Save