Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update i18n scripts
  • Loading branch information
jef-n committed Jan 25, 2017
1 parent 7642ce9 commit f389069
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 47 deletions.
2 changes: 1 addition & 1 deletion cmake/FindQwt.cmake
Expand Up @@ -34,7 +34,7 @@ FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
/usr/local/include
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6
PATH_SUFFIXES qwt-qt5 qwt qwt5 qwt6
)

IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
Expand Down
2 changes: 1 addition & 1 deletion scripts/qgm2cpp.pl
Expand Up @@ -21,7 +21,7 @@
/*
This is NOT a proper c++ source code. This file is only designed to be caught
by qmake and included in lupdate. It contains all translateable strings collected
by pylupdate4.
by pylupdate5.
*/
EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/ts2cpp.pl
Expand Up @@ -26,7 +26,7 @@
/*
This is NOT a proper c++ source code. This file is only designed to be caught
by qmake and included in lupdate. It contains all translateable strings collected
by pylupdate4.
by pylupdate5.
*/
EOF
Expand Down
10 changes: 5 additions & 5 deletions scripts/update_ts.sh
Expand Up @@ -48,19 +48,19 @@ cleanup() {

PATH=$QTDIR/bin:$PATH

if type qmake-qt4 >/dev/null 2>&1; then
QMAKE=qmake-qt4
if type qmake-qt5 >/dev/null 2>&1; then
QMAKE=qmake-qt5
else
QMAKE=qmake
fi

if ! type pylupdate4 >/dev/null 2>&1; then
if ! type pylupdate5 >/dev/null 2>&1; then
echo "pylupdate4 not found"
exit 1
fi

if type lupdate-qt4 >/dev/null 2>&1; then
LUPDATE=lupdate-qt4
if type lupdate-qt5 >/dev/null 2>&1; then
LUPDATE=lupdate-qt5
else
LUPDATE=lupdate
fi
Expand Down
16 changes: 8 additions & 8 deletions scripts/update_ts_files.sh
Expand Up @@ -56,19 +56,19 @@ cleanup() {

PATH=$QTDIR/bin:$PATH

if type qmake-qt4 >/dev/null 2>&1; then
QMAKE=qmake-qt4
if type qmake-qt5 >/dev/null 2>&1; then
QMAKE=qmake-qt5
else
QMAKE=qmake
fi

if ! type pylupdate4 >/dev/null 2>&1; then
echo "pylupdate4 not found"
if ! type pylupdate5 >/dev/null 2>&1; then
echo "pylupdate5 not found"
exit 1
fi

if type lupdate-qt4 >/dev/null 2>&1; then
LUPDATE=lupdate-qt4
if type lupdate-qt5 >/dev/null 2>&1; then
LUPDATE=lupdate-qt5
else
LUPDATE=lupdate
fi
Expand Down Expand Up @@ -118,13 +118,13 @@ fi

echo Updating python translations
cd python
pylupdate4 utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
pylupdate5 utils.py {console,pyplugin_installer}/*.{py,ui} -ts python-i18n.ts
perl ../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
rm python-i18n.ts
cd ..
for i in python/plugins/*/CMakeLists.txt; do
cd ${i%/*}
pylupdate4 $(find . -name "*.py" -o -name "*.ui") -ts python-i18n.ts
pylupdate5 $(find . -name "*.py" -o -name "*.ui") -ts python-i18n.ts
perl ../../../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
rm python-i18n.ts
cd ../../..
Expand Down
31 changes: 0 additions & 31 deletions src/server/qgsrequesthandler.cpp
Expand Up @@ -111,41 +111,10 @@ void QgsRequestHandler::setupParameters()
const QgsServerRequest::Parameters parameters = mRequest.parameters();

// SLD

QString value = parameters.value( QStringLiteral( "SLD" ) );
if ( !value.isEmpty() )
{
// XXX Why keeping this ????
#if QT_VERSION < 0x050000
QByteArray fileContents;
if ( value.startsWith( "http", Qt::CaseInsensitive ) )
{
QgsHttpTransaction http( value );
if ( !http.getSynchronously( fileContents ) )
{
fileContents.clear();
}
}
else if ( value.startsWith( "ftp", Qt::CaseInsensitive ) )
{
Q_NOWARN_DEPRECATED_PUSH;
QgsFtpTransaction ftp;
if ( !ftp.get( value, fileContents ) )
{
fileContents.clear();
}
value = QUrl::fromPercentEncoding( fileContents );
Q_NOWARN_DEPRECATED_POP;
}

if fileContents.size() > 0 )
{
mRequest.setParameter( QStringLiteral( "SLD" ), QUrl::fromPercentEncoding( fileContents ) );
}
#else
QgsMessageLog::logMessage( QStringLiteral( "http and ftp methods not supported with Qt5." ) );
#endif

}

// SLD_BODY
Expand Down

0 comments on commit f389069

Please sign in to comment.