refactor: replace QRegExp with QRegularExpression
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
984692dc62
commit
ff2cd50bfa
17 changed files with 48 additions and 53 deletions
|
@ -22,10 +22,10 @@ void SkinUploadDialog::on_buttonBox_accepted()
|
|||
{
|
||||
QString fileName;
|
||||
QString input = ui->skinPathTextBox->text();
|
||||
QRegExp urlPrefixMatcher("^([a-z]+)://.+$");
|
||||
QRegularExpression urlPrefixMatcher(QRegularExpression::anchoredPattern("^([a-z]+)://.+$"));
|
||||
bool isLocalFile = false;
|
||||
// it has an URL prefix -> it is an URL
|
||||
if(urlPrefixMatcher.exactMatch(input))
|
||||
if(urlPrefixMatcher.match(input).hasMatch()) // TODO: does this work?
|
||||
{
|
||||
QUrl fileURL = input;
|
||||
if(fileURL.isValid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue