read any file, fix space in file switch name

This commit is contained in:
WarmUpTill 2018-05-22 21:32:41 +02:00
parent 6338aaa891
commit 3381e6d62f
2 changed files with 4 additions and 4 deletions

View File

@ -67,7 +67,7 @@ void SceneSwitcher::on_writePathLineEdit_textChanged(const QString& text)
void SceneSwitcher::on_browseButton_2_clicked()
{
QString path = QFileDialog::getOpenFileName(
this, tr("Select a file to read from ..."), QDir::currentPath(), tr("Text files (*.txt)"));
this, tr("Select a file to read from ..."), QDir::currentPath(), tr("Any files (*.*)"));
if (!path.isEmpty())
ui->readPathLineEdit->setText(path);
}
@ -182,7 +182,7 @@ void SwitcherData::checkFileContent(bool& match, OBSWeakSource& scene, OBSWeakSo
void SceneSwitcher::on_browseButton_3_clicked()
{
QString path = QFileDialog::getOpenFileName(
this, tr("Select a file to read from ..."), QDir::currentPath(), tr("Text files (*.txt)"));
this, tr("Select a file to read from ..."), QDir::currentPath(), tr("Any files (*.*)"));
if (!path.isEmpty())
ui->filePathLineEdit->setText(path);
}

View File

@ -75,8 +75,8 @@ static inline QString MakeFileSwitchName(
QString switchName = QStringLiteral("Switch to ") + scene + QStringLiteral(" using ") + transition + QStringLiteral(" if ")
+ fileName;
if (useTime)
switchName += QStringLiteral(" was modified and ");
switchName += QStringLiteral("contains");
switchName += QStringLiteral(" was modified and");
switchName += QStringLiteral(" contains");
if (useRegex)
switchName += QStringLiteral(" (RegEx): \n\"");
else