aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/filewizardpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/utils/filewizardpage.cpp')
-rw-r--r--src/libs/utils/filewizardpage.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp
index cd9f3b345b..d280cf2dbb 100644
--- a/src/libs/utils/filewizardpage.cpp
+++ b/src/libs/utils/filewizardpage.cpp
@@ -82,7 +82,7 @@ QString FileWizardPage::fileName() const
QString FileWizardPage::path() const
{
- return d->m_ui.pathChooser->path();
+ return d->m_ui.pathChooser->filePath().toString();
}
void FileWizardPage::setPath(const QString &path)
@@ -110,6 +110,19 @@ void FileWizardPage::setPathLabel(const QString &label)
d->m_ui.pathLabel->setText(label);
}
+void FileWizardPage::setDefaultSuffix(const QString &suffix)
+{
+ if (suffix.isEmpty()) {
+ const auto layout = qobject_cast<QFormLayout *>(this->layout());
+ if (layout->rowCount() == 3)
+ layout->removeRow(0);
+ } else {
+ d->m_ui.defaultSuffixLabel->setText(
+ tr("The default suffix if you do not explicitly specify a file extension is \".%1\".")
+ .arg(suffix));
+ }
+}
+
bool FileWizardPage::forceFirstCapitalLetterForFileName() const
{
return d->m_ui.nameLineEdit->forceFirstCapitalLetter();