Code clean up

This commit is contained in:
Christophe Dumez
2010-12-30 19:38:53 +00:00
parent 5696944c6f
commit 64f4775a81
10 changed files with 19 additions and 26 deletions

View File

@@ -430,8 +430,8 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) {
return;
}
if(url.endsWith(".py", Qt::CaseInsensitive)) {
QString plugin_name = url.split('/').last();
plugin_name.replace(".py", "");
QString plugin_name = misc::fileName(url);
plugin_name.chop(3); // Remove extension
installPlugin(filePath, plugin_name);
misc::safeRemove(filePath);
return;