summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 45a6663..42093cf 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -1003,24 +1003,29 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
QString dest = "root";
if ( !p->isInstalled() )
{
InstallData *newitem = new InstallData();
newitem->option = "I";
newitem->packageName = name;
return newitem;
}
else
{
InstallData *newitem = new InstallData();
newitem->option = "D";
+
+ // If local file, remove using package name, not filename
+ if ( p->isPackageStoredLocally() )
+ name = item->text();
+
if ( !p->isPackageStoredLocally() )
newitem->packageName = p->getInstalledPackageName();
else
newitem->packageName = name;
if ( p->getInstalledTo() )
{
newitem->destination = p->getInstalledTo();
}
else
{
newitem->destination = p->getLocalPackage()->getInstalledTo();
@@ -1032,24 +1037,28 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
// If the version requested is older and user selected a local ipk file, then reinstall the file
if ( p->isPackageStoredLocally() && val == -1 )
val = 0;
if ( val == -2 )
{
// Error - should handle
}
else if ( val == -1 )
{
// Version available is older - remove only
newitem->option = "D";
+
+ // If local file, remove using package name, not filename
+ if ( p->isPackageStoredLocally() )
+ name = item->text();
}
else
{
QString caption;
QString text;
QString secondButton;
QString secondOption;
if ( val == 0 )
{
// Version available is the same - option to remove or reinstall
caption = tr( "Do you wish to remove or reinstall\n%1?" );
text = tr( "Remove or ReInstall" );
@@ -1071,24 +1080,27 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
{
QString msgtext;
msgtext = caption.arg( ( const char * )name );
QuestionDlg dlg( text, msgtext, secondButton );
switch( dlg.exec() )
{
case 0: // Cancel
delete newitem;
return 0x0;
break;
case 1: // Remove
newitem->option = "D";
+ // If local file, remove using package name, not filename
+ if ( p->isPackageStoredLocally() )
+ name = item->text();
break;
case 2: // Reinstall or Upgrade
newitem->option = secondOption;
break;
}
}
else
{
// newitem->option = stickyOption;
}
}