Git: Allow . in checkout pathes

Task-number: QTCREATORBUG-3141
This commit is contained in:
Tobias Hunger
2010-11-22 18:05:49 +01:00
parent df4aa2d78d
commit e151381a8a
3 changed files with 4 additions and 9 deletions

View File

@@ -128,7 +128,7 @@ QString CloneWizardPage::directoryFromRepository(const QString &urlIn) const
} }
// fix invalid characters // fix invalid characters
const QChar dash = QLatin1Char('-'); const QChar dash = QLatin1Char('-');
url.replace(QRegExp(QLatin1String("[^0-9a-zA-Z_-]")), dash); url.replace(QRegExp(QLatin1String("[^0-9a-zA-Z_.-]")), dash);
// trim leading dashes (they are annoying and get created when using local pathes) // trim leading dashes (they are annoying and get created when using local pathes)
url.replace(QRegExp(QLatin1String("^-+")), QString()); url.replace(QRegExp(QLatin1String("^-+")), QString());
return url; return url;

View File

@@ -50,7 +50,7 @@ BaseCheckoutWizardPage::BaseCheckoutWizardPage(QWidget *parent) :
connect(d->ui.repositoryLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotRepositoryChanged(QString))); connect(d->ui.repositoryLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotRepositoryChanged(QString)));
connect(d->ui.checkoutDirectoryLineEdit, SIGNAL(validChanged()), connect(d->ui.checkoutDirectoryLineEdit, SIGNAL(textChanged(QString)),
this, SLOT(slotChanged())); this, SLOT(slotChanged()));
connect(d->ui.checkoutDirectoryLineEdit, SIGNAL(textEdited(QString)), this, SLOT(slotDirectoryEdited())); connect(d->ui.checkoutDirectoryLineEdit, SIGNAL(textEdited(QString)), this, SLOT(slotDirectoryEdited()));
connect(d->ui.branchComboBox, SIGNAL(currentIndexChanged(int)), connect(d->ui.branchComboBox, SIGNAL(currentIndexChanged(int)),
@@ -87,7 +87,7 @@ void BaseCheckoutWizardPage::addRepositoryControl(QWidget *w)
bool BaseCheckoutWizardPage::checkIsValid() const bool BaseCheckoutWizardPage::checkIsValid() const
{ {
return d->ui.pathChooser->isValid() return d->ui.pathChooser->isValid()
&& d->ui.checkoutDirectoryLineEdit->isValid() && !d->ui.checkoutDirectoryLineEdit->text().isEmpty()
&& !d->ui.repositoryLineEdit->text().isEmpty(); && !d->ui.repositoryLineEdit->text().isEmpty();
} }

View File

@@ -112,7 +112,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="Utils::ProjectNameValidatingLineEdit" name="checkoutDirectoryLineEdit"> <widget class="QLineEdit" name="checkoutDirectoryLineEdit">
<property name="toolTip"> <property name="toolTip">
<string>The local directory that will contain the code after the checkout.</string> <string>The local directory that will contain the code after the checkout.</string>
</property> </property>
@@ -140,11 +140,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>Utils::ProjectNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/projectnamevalidatinglineedit.h</header>
</customwidget>
<customwidget> <customwidget>
<class>Utils::PathChooser</class> <class>Utils::PathChooser</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>