Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/TagDialog.cpp
Show First 20 Lines • Show All 820 Lines • ▼ Show 20 Line(s) | 706 | { | |||
---|---|---|---|---|---|
821 | ui->labelsList->update(); | 821 | ui->labelsList->update(); | ||
822 | 822 | | |||
823 | updateCover(); | 823 | updateCover(); | ||
824 | 824 | | |||
825 | setControlsAccessability(); | 825 | setControlsAccessability(); | ||
826 | 826 | | |||
827 | // If it's a local file, write the directory to m_path, else disable the "open in konqui" button | 827 | // If it's a local file, write the directory to m_path, else disable the "open in konqui" button | ||
828 | QString urlString = tags.value( Meta::Field::URL ).toString(); | 828 | QString urlString = tags.value( Meta::Field::URL ).toString(); | ||
829 | QUrl url( urlString ); | 829 | QUrl url = QUrl::fromUserInput( urlString ); | ||
830 | //pathOrUrl will give localpath or proper url for remote. | 830 | //QUrl::PreferLocalFile will give localpath or proper url for remote. | ||
831 | ui->kLineEdit_location->setText( url.toDisplayString() ); | 831 | ui->kLineEdit_location->setText( url.toDisplayString( QUrl::PreferLocalFile ) ); | ||
832 | if( url.isLocalFile() ) | 832 | if( url.isLocalFile() ) | ||
833 | { | 833 | { | ||
834 | ui->locationLabel->show(); | 834 | ui->locationLabel->show(); | ||
835 | ui->kLineEdit_location->show(); | 835 | ui->kLineEdit_location->show(); | ||
836 | QFileInfo fi( urlString ); | 836 | QFileInfo fi( urlString ); | ||
837 | m_path = fi.isDir() ? urlString : url.adjusted(QUrl::RemoveFilename).path(); | 837 | m_path = fi.isDir() ? urlString : url.adjusted(QUrl::RemoveFilename).path(); | ||
838 | ui->pushButton_open->setEnabled( true ); | 838 | ui->pushButton_open->setEnabled( true ); | ||
839 | } | 839 | } | ||
▲ Show 20 Lines • Show All 567 Lines • Show Last 20 Lines |