forked from qt-creator/qt-creator
FileInProjectFinder: Fix compilation with 4.7.4
Don't depend on QUrl::isLocalFile, which only exists in 4.8. Change-Id: I67a8e35c8754396424c5578216bc6deb02ae0d50 Reviewed-on: http://codereview.qt.nokia.com/1959 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -98,13 +98,9 @@ void FileInProjectFinder::setProjectFiles(const QStringList &projectFiles)
|
|||||||
*/
|
*/
|
||||||
QString FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const
|
QString FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const
|
||||||
{
|
{
|
||||||
QString originalPath;
|
QString originalPath = fileUrl.toLocalFile();
|
||||||
if (fileUrl.isLocalFile()) {
|
if (originalPath.isEmpty()) // e.g. qrc://
|
||||||
originalPath = fileUrl.toLocalFile();
|
|
||||||
} else {
|
|
||||||
// strip e.g. leading qrc://
|
|
||||||
originalPath = fileUrl.path();
|
originalPath = fileUrl.path();
|
||||||
}
|
|
||||||
|
|
||||||
if (originalPath.isEmpty()) {
|
if (originalPath.isEmpty()) {
|
||||||
if (success)
|
if (success)
|
||||||
|
|||||||
Reference in New Issue
Block a user