diff options
| author | 2011-03-25 00:31:19 +0000 | |
|---|---|---|
| committer | 2011-03-25 00:31:19 +0000 | |
| commit | 922b69382ee59ed2b21e4c1842e3cd42ee86a1ba (patch) | |
| tree | 90b2eb91f87aa17d5ed516cfb72576f2f7cc6663 /src/modules/addon/PackAddonDialog.cpp | |
| parent | reworked KviLocale stuff: now it's a singleton (diff) | |
| download | KVIrc-922b69382ee59ed2b21e4c1842e3cd42ee86a1ba.tar.gz KVIrc-922b69382ee59ed2b21e4c1842e3cd42ee86a1ba.tar.bz2 KVIrc-922b69382ee59ed2b21e4c1842e3cd42ee86a1ba.zip | |
Some quirks related to addon management
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5697 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/addon/PackAddonDialog.cpp')
| -rw-r--r-- | src/modules/addon/PackAddonDialog.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/addon/PackAddonDialog.cpp b/src/modules/addon/PackAddonDialog.cpp index 0e36a1654..49c6273bc 100644 --- a/src/modules/addon/PackAddonDialog.cpp +++ b/src/modules/addon/PackAddonDialog.cpp @@ -42,7 +42,7 @@ #include <QDirIterator> #include <QDateTime> #include <QBuffer> - +#include <QFile> PackAddonDialog::PackAddonDialog(QWidget * pParent) : QWizard(pParent) @@ -379,6 +379,12 @@ bool PackAddonDialog::packAddon() m_szSavePath += KVI_FILEEXTENSION_ADDONPACKAGE; } + if(QFile::exists(m_szSavePath)) + { + if(QMessageBox::question(this,__tr2qs_ctx("Export Addon - KVIrc","addon"),__tr2qs_ctx("File %1 already exists. Do you want to overwrite it?","addon"),QMessageBox::Yes,QMessageBox::No) == QMessageBox::No) + return false; + } + if(!pw.pack(m_szSavePath)) { szTmp = __tr2qs_ctx("Packaging failed","addon"); @@ -389,7 +395,7 @@ bool PackAddonDialog::packAddon() } - QMessageBox::information(this,__tr2qs_ctx("Export Addon - KVIrc","addon"),__tr2qs("Package saved successfully in ") + m_szSavePath,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + QMessageBox::information(this,__tr2qs_ctx("Export Addon - KVIrc","addon"),__tr2qs_ctx("Package saved successfully in %1","addon").arg(m_szSavePath),QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); return true; } @@ -662,3 +668,4 @@ void PackAddonSummaryFilesWidget::showEvent(QShowEvent *) m_pFiles->setPlainText(list.join("\n")); } + |
