forked from qt-creator/qt-creator
Core: Export PromptOverwriteDialog
This is necessary since the JsonWizard will need to trigger this dialog, too. Change-Id: Ic8eebc77282a620b13c227890b5f1861a31a2b20 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -420,7 +420,7 @@ BaseFileWizardFactory::OverwriteResult BaseFileWizardFactory::promptOverwrite(Ge
|
|||||||
return OverwriteError;
|
return OverwriteError;
|
||||||
}
|
}
|
||||||
// Prompt to overwrite existing files.
|
// Prompt to overwrite existing files.
|
||||||
Internal::PromptOverwriteDialog overwriteDialog;
|
PromptOverwriteDialog overwriteDialog;
|
||||||
// Scripts cannot handle overwrite
|
// Scripts cannot handle overwrite
|
||||||
overwriteDialog.setFiles(existingFiles);
|
overwriteDialog.setFiles(existingFiles);
|
||||||
foreach (const GeneratedFile &file, *files)
|
foreach (const GeneratedFile &file, *files)
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ static inline QString fileNameOfItem(const QStandardItem *item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
PromptOverwriteDialog::PromptOverwriteDialog(QWidget *parent) :
|
PromptOverwriteDialog::PromptOverwriteDialog(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
@@ -157,5 +156,4 @@ bool PromptOverwriteDialog::isFileChecked(const QString &f) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
#ifndef PROMPTOVERWRITEDIALOG_H
|
#ifndef PROMPTOVERWRITEDIALOG_H
|
||||||
#define PROMPTOVERWRITEDIALOG_H
|
#define PROMPTOVERWRITEDIALOG_H
|
||||||
|
|
||||||
|
#include "../core_global.h"
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -40,10 +42,9 @@ class QLabel;
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
// Documentation inside.
|
// Documentation inside.
|
||||||
class PromptOverwriteDialog : public QDialog
|
class CORE_EXPORT PromptOverwriteDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -69,7 +70,6 @@ private:
|
|||||||
QStandardItemModel *m_model;
|
QStandardItemModel *m_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
#endif // PROMPTOVERWRITEDIALOG_H
|
#endif // PROMPTOVERWRITEDIALOG_H
|
||||||
|
|||||||
Reference in New Issue
Block a user