Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #6519 from elpaso/server-tempfile-fix
[bugfix][server] Fix temporary path permission issue
- Loading branch information
|
@@ -59,7 +59,7 @@ services. A module may register multiple services. |
|
|
|
|
|
The registry gain ownership of services and will call 'delete' on cleanup |
|
|
|
|
|
:param service: a QgsServerResponse to be registered |
|
|
:param service: a QgsService to be registered |
|
|
%End |
|
|
|
|
|
int unregisterService( const QString &name, const QString &version = QString() ); |
|
|
|
@@ -73,7 +73,7 @@ class SERVER_EXPORT QgsServiceRegistry |
|
|
* |
|
|
* The registry gain ownership of services and will call 'delete' on cleanup |
|
|
* |
|
|
* \param service a QgsServerResponse to be registered |
|
|
* \param service a QgsService to be registered |
|
|
*/ |
|
|
void registerService( QgsService *service SIP_TRANSFER ); |
|
|
|
|
|
|
@@ -68,6 +68,7 @@ |
|
|
#include "qgsdxfexport.h" |
|
|
#include "qgssymbollayerutils.h" |
|
|
#include "qgslayoutitemlegend.h" |
|
|
#include "qgsserverexception.h" |
|
|
|
|
|
#include <QImage> |
|
|
#include <QPainter> |
|
@@ -379,11 +380,11 @@ namespace QgsWms |
|
|
configurePrintLayout( layout.get(), mapSettings ); |
|
|
|
|
|
// Get the temporary output file |
|
|
QTemporaryFile tempOutputFile( QStringLiteral( "XXXXXX.%1" ).arg( formatString.toLower() ) ); |
|
|
QTemporaryFile tempOutputFile( QDir::tempPath() + '/' + QStringLiteral( "XXXXXX.%1" ).arg( formatString.toLower() ) ); |
|
|
if ( !tempOutputFile.open() ) |
|
|
{ |
|
|
// let the caller handle this |
|
|
return nullptr; |
|
|
throw QgsServerException( QStringLiteral( "Could not open temporary file for the GetPrint request." ) ); |
|
|
|
|
|
} |
|
|
|
|
|
if ( formatString.compare( QLatin1String( "svg" ), Qt::CaseInsensitive ) == 0 ) |
|
|