Skip to content

Commit

Permalink
post rebase adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed May 15, 2024
1 parent 3cd8613 commit 829c476
Showing 1 changed file with 26 additions and 31 deletions.
57 changes: 26 additions & 31 deletions app/inpututils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2158,8 +2158,6 @@ QList<QgsPoint> InputUtils::parsePositionUpdates( const QString &data )
return parsedUpdates;
}

<<<<<<< HEAD
<<<<<<< HEAD
QString InputUtils::getManufacturer()
{
#ifdef Q_OS_ANDROID
Expand All @@ -2180,42 +2178,39 @@ QString InputUtils::getDeviceModel()
return QStringLiteral( "N/A" );
}

void InputUtils::openLink( const QString &homePath, const QString &link )
=======
bool InputUtils::openLink( const QString &homePath, const QString &link )
>>>>>>> 247d842d (first part of post review changes)
{
if ( link.startsWith( LOCAL_FILE_PREFIX ) )
{
QString relativePath = link.mid( QString( LOCAL_FILE_PREFIX ).length() );
QString absoluteLinkPath = homePath + QDir::separator() + relativePath;
if ( !fileExists( absoluteLinkPath ) )
if ( link.startsWith( LOCAL_FILE_PREFIX ) )
{
return false;
}
QString relativePath = link.mid( QString( LOCAL_FILE_PREFIX ).length() );
QString absoluteLinkPath = homePath + QDir::separator() + relativePath;
if ( !fileExists( absoluteLinkPath ) )
{
return false;
}
#ifdef Q_OS_ANDROID
if ( !mAndroidUtils->openFile( absoluteLinkPath ) )
{
return false;
}
if ( !mAndroidUtils->openFile( absoluteLinkPath ) )
{
return false;
}
#elif defined(Q_OS_IOS)
if ( ! IosUtils::openFile( absoluteLinkPath ) )
{
return false;
}
if ( ! IosUtils::openFile( absoluteLinkPath ) )
{
return false;
}
#else
// Desktop environments
QUrl fileUrl = QUrl::fromLocalFile( absoluteLinkPath );
if ( !QDesktopServices::openUrl( fileUrl ) )
// Desktop environments
QUrl fileUrl = QUrl::fromLocalFile( absoluteLinkPath );
if ( !QDesktopServices::openUrl( fileUrl ) )
{
return false;
}
#endif
}
else
{
return false;
QDesktopServices::openUrl( QUrl( link ) );
}
#endif
}
else
{
QDesktopServices::openUrl( QUrl( link ) );
}

return true;
return true;
}

0 comments on commit 829c476

Please sign in to comment.