summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/installdialog.cpp17
-rw-r--r--noncore/unsupported/oipkg/installdialog.h1
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp2
3 files changed, 16 insertions, 4 deletions
diff --git a/noncore/unsupported/oipkg/installdialog.cpp b/noncore/unsupported/oipkg/installdialog.cpp
index c676e84..fd93ad3 100644
--- a/noncore/unsupported/oipkg/installdialog.cpp
+++ b/noncore/unsupported/oipkg/installdialog.cpp
@@ -34,52 +34,60 @@ InstallDialog::InstallDialog( PackageManagerSettings* s, QWidget* parent, const
ListViewPackages = new PackageListView( this,"listViewPackages",settings );
InstallDialogLayout->addWidget( ListViewPackages, 0, 0 );
GroupBoxOptions = new QGroupBox( this, "GroupBoxOptions" );
GroupBoxOptions->setTitle( tr( "Ipkg options" ) );
GroupBoxOptions->setColumnLayout(0, Qt::Vertical );
GroupBoxOptions->layout()->setSpacing( 0 );
GroupBoxOptions->layout()->setMargin( 0 );
GroupBoxOptionsLayout = new QGridLayout( GroupBoxOptions->layout() );
GroupBoxOptionsLayout->setAlignment( Qt::AlignTop );
- GroupBoxOptionsLayout->setSpacing( 2 );
- GroupBoxOptionsLayout->setMargin( 2 );
+ GroupBoxOptionsLayout->setSpacing( 0 );
+ GroupBoxOptionsLayout->setMargin( 0 );
_force_depends = new QCheckBox( GroupBoxOptions, "_force_depends" );
QFont _force_depends_font( _force_depends->font() );
_force_depends_font.setPointSize( 8 );
_force_depends->setFont( _force_depends_font );
_force_depends->setText( tr( "-force-depends" ) );
//_force_depends->setChecked( true );
GroupBoxOptionsLayout->addWidget( _force_depends, 0, 0 );
_force_reinstall = new QCheckBox( GroupBoxOptions, "_force_reinstall" );
QFont _force_reinstall_font( _force_reinstall->font() );
_force_reinstall_font.setPointSize( 8 );
_force_reinstall->setFont( _force_reinstall_font );
_force_reinstall->setText( tr( "-force-reinstall" ) );
GroupBoxOptionsLayout->addWidget( _force_reinstall, 1, 0 );
_force_remove = new QCheckBox( GroupBoxOptions, "_force_remove" );
QFont _force_remove_font( _force_remove->font() );
_force_remove_font.setPointSize( 8 );
- _force_remove->setFont( _force_remove_font );
+ _force_remove->setFont( _force_remove_font );
_force_remove->setText( tr( "-force-removal-of-essential-packages" ) );
GroupBoxOptionsLayout->addWidget( _force_remove, 2, 0 );
+ _force_overwrite = new QCheckBox( GroupBoxOptions, "_force_overwrite" );
+ QFont _force_overwrite_font( _force_overwrite->font() );
+ _force_overwrite_font.setPointSize( 8 );
+ _force_overwrite->setFont( _force_overwrite_font );
+ _force_overwrite->setText( tr( "-force-overwrite" ) );
+
+ GroupBoxOptionsLayout->addWidget(_force_overwrite, 3, 0 );
+
InstallDialogLayout->addWidget( GroupBoxOptions, 1, 0 );
toRemoveItem = new QCheckListItem( ListViewPackages, tr("To remove") );
toInstallItem = new QCheckListItem( ListViewPackages, tr("To install") );
}
/*
* Destroys the object and frees any allocated resources
*/
InstallDialog::~InstallDialog()
{
// no need to delete child widgets, Qt does it all for us
@@ -89,20 +97,21 @@ InstallDialog::~InstallDialog()
* Main event handler. Reimplemented to handle application
* font changes
*/
bool InstallDialog::event( QEvent* ev )
{
bool ret = QDialog::event( ev );
if ( ev->type() == QEvent::ApplicationFontChange ) {
QFont _force_depends_font( _force_depends->font() );
_force_depends_font.setPointSize( 8 );
_force_depends->setFont( _force_depends_font );
QFont _force_reinstall_font( _force_reinstall->font() );
_force_reinstall_font.setPointSize( 8 );
- _force_reinstall->setFont( _force_reinstall_font );
+ _force_reinstall->setFont( _force_reinstall_font );
QFont _force_remove_font( _force_remove->font() );
+ QFont _force_overwrite_font( _force_overwrite->font() );
_force_remove_font.setPointSize( 8 );
_force_remove->setFont( _force_remove_font );
}
return ret;
}
diff --git a/noncore/unsupported/oipkg/installdialog.h b/noncore/unsupported/oipkg/installdialog.h
index 828c8df..d3510ff 100644
--- a/noncore/unsupported/oipkg/installdialog.h
+++ b/noncore/unsupported/oipkg/installdialog.h
@@ -26,24 +26,25 @@ class QListViewItem;
class InstallDialog : public QDialog
{
Q_OBJECT
public: InstallDialog( PackageManagerSettings* s, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~InstallDialog();
PackageListView* ListViewPackages;
QGroupBox* GroupBoxOptions;
QCheckBox* _force_depends;
QCheckBox* _force_reinstall;
+ QCheckBox* _force_overwrite;
QCheckBox* _force_remove;
QCheckListItem *toRemoveItem;
QCheckListItem *toInstallItem;
protected:
QGridLayout* InstallDialogLayout;
QGridLayout* GroupBoxOptionsLayout;
bool event( QEvent* );
private:
PackageManagerSettings* settings;
};
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 84de67b..2ed313c 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -66,24 +66,26 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
cmd += " -dest "+ dest;
cmd += " -force-defaults ";
if ( installDialog && installDialog->_force_depends )
{
if (installDialog->_force_depends->isChecked())
cmd += " -force-depends ";
if (installDialog->_force_reinstall->isChecked())
cmd += " -force-reinstall ";
if (installDialog->_force_remove->isChecked())
cmd += " -force-removal-of-essential-packages ";
+ if (installDialog->_force_overwrite->isChecked())
+ cmd += " -force-overwrite ";
}
} //!args.contains("update")
out( "Starting to "+ args+"\n");
qApp->processEvents();
cmd += args;
out( "running:\n"+cmd+"\n" );
pvDebug(2,"running:"+cmd);
qApp->processEvents();
FILE *fp;
char line[130];
QString lineStr, lineStrOld;