Skip to content

Commit

Permalink
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging…
Browse files Browse the repository at this point in the history
… into master-integration

* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging:
  Symbian configuration parameter change for linux building
  Improve patch_capabilities script output.
  Fix QtSql autotest server addresses
  Update SQLite version number in legal document
  Update SQLite version mentioned in licence document
  Symbian Linuxification building case changes
  Fix FTP example to handle failure to open network session
  Use QBasicAtomicInt as a static variable
  FTP - fix interoperability issues with SIZE command
  QS60StyleAnimation exception safety
  Catch potential throw in ~QSymbianControl
  Fixed access to null threadData in ~QObjectPrivate
  Fix the build for makefile build system of Symbian
  Symbian - fix compile error when default configured
  • Loading branch information
Qt Continuous Integration System committed Oct 28, 2011
2 parents 80f4706 + f6f118b commit cf56956
Show file tree
Hide file tree
Showing 19 changed files with 81 additions and 86 deletions.
15 changes: 8 additions & 7 deletions bin/patch_capabilities.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#
# Note: Please make sure to output all changes done to the pkg file in a print statements
# starting with "Patching: " to ease integration into IDEs!
# Similarly, any actual error messages should start with "ERROR:"
#

use File::Copy;
Expand Down Expand Up @@ -103,13 +104,16 @@ ($)
# Parse the first given script argument as a ".pkg" file name.
my $pkgFileName = shift(@ARGV);
my $justCheck = "";
my $errorPrefix = "ERROR:";
my $msgPrefix = "Patching:";
my $tempPatchPath = "";

if ($pkgFileName eq "-c") {
$pkgFileName = shift(@ARGV);
$justCheck = true;
# All messages are simply warnings, as no actual patching is attempted.
$msgPrefix = "Warning:";
$errorPrefix = "Warning:";
}

if ($pkgFileName eq "-t") {
Expand Down Expand Up @@ -302,7 +306,7 @@ ($)
if ($binaryBaseName =~ /\.exe$/) {
# Installer refuses to install protected executables in a self signed package, so abort if one is detected.
# We can't simply just patch the executable SID, as any registration resources executable uses will be linked to it via SID.
print ("$msgPrefix Executable with SID in the protected range (0x$exeSid) detected: \"$binaryBaseName\". A self-signed sis with protected executables is not supported.\n\n");
print ("$errorPrefix Executable with SID in the protected range (0x$exeSid) detected: \"$binaryBaseName\". A self-signed sis with protected executables is not supported.\n\n");
$checkFailed = true;
}
}
Expand All @@ -315,9 +319,6 @@ ($)
$_ = trim($_);
if ($capabilitiesToAllow =~ /$_/) {
push(@capabilitiesToSet, $_);
if (Location =~ /$_/i) {
print ("$msgPrefix \"Location\" capability detected for binary: \"$binaryBaseName\". This capability is not self-signable for S60 3rd edition feature pack 1 devices, so installing this package on those devices will most likely not work.\n\n");
}
} else {
push(@capabilitiesToDrop, $_);
}
Expand Down Expand Up @@ -345,7 +346,7 @@ ($)
if ($binaryBaseName =~ /\.exe$/) {
# While libraries often have capabilities they do not themselves need just to enable them to be loaded by wider variety of processes,
# executables are more likely to need every capability they have been assigned or they won't function correctly.
print ("$msgPrefix Executable with capabilities incompatible with self-signing detected: \"$binaryBaseName\". (Incompatible capabilities: \"$capsToDropStr\".) Reducing capabilities is only supported for libraries.\n");
print ("$errorPrefix Executable with capabilities incompatible with self-signing detected: \"$binaryBaseName\". (Incompatible capabilities: \"$capsToDropStr\".) Reducing capabilities is only supported for libraries.\n");
$checkFailed = true;
} else {
print ("$msgPrefix The following capabilities used in \"$binaryBaseName\" are not compatible with a self-signed package and will be removed: \"$capsToDropStr\".\n");
Expand All @@ -368,9 +369,9 @@ ($)
if ($checkFailed) {
print ("\n");
if ($justCheck) {
print ("$msgPrefix The package is not compatible with self-signing.\n");
print ("$msgPrefix The package is not compatible with self-signing. ");
} else {
print ("$msgPrefix Unable to patch the package for self-singing.\n");
print ("$errorPrefix Unable to patch the package for self-singing. ");
}
print ("Use a proper developer certificate for signing this package.\n\n");
exit(1);
Expand Down
4 changes: 2 additions & 2 deletions config.profiles/symbian/bld.inf
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ translations/qt_zh_tw_symbian.ts /epoc32/include/platform/qt/translations/qt_zh_
PRJ_EXTENSIONS
START EXTENSION qt/qtconfig
OPTION QT_ROOT ..
OPTION OPTIONS -opensource -confirm-license -openvg -opengl-es-2 -script -no-scripttools -no-webkit -make make -graphicssystem openvg -phonon -phonon-backend -usedeffiles -dont-process -nomake examples -nomake demos -nomake tools -audio-backend -fpu softvfp+vfpv2
END
OPTION OPTIONS -opensource -confirm-license -openvg -opengl es2 -script -no-scripttools -no-webkit -make make -graphicssystem openvg -phonon -phonon-backend -usedeffiles -dont-process -nomake examples -nomake demos -nomake tools -audio-backend -fpu softvfp+vfpv2
END
2 changes: 1 addition & 1 deletion doc/src/legal/3rdparty.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
See \c src/3rdparty/sha1/sha1.cpp for more information about the terms and
conditions under which the code is supplied.

\section1 SQLite (\c sqlite) version 3.5.9
\section1 SQLite (\c sqlite) version 3.7.7.1

\e{SQLite is a small C library that implements a
self-contained, embeddable, zero-configuration SQL database engine.}
Expand Down
56 changes: 32 additions & 24 deletions examples/network/qftp/ftpwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,6 @@ FtpWindow::FtpWindow(QWidget *parent)
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);

QNetworkConfigurationManager manager;
if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
// Get saved network configuration
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
settings.beginGroup(QLatin1String("QtNetwork"));
const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
settings.endGroup();

// If the saved network configuration is not currently discovered use the system default
QNetworkConfiguration config = manager.configurationFromIdentifier(id);
if ((config.state() & QNetworkConfiguration::Discovered) !=
QNetworkConfiguration::Discovered) {
config = manager.defaultConfiguration();
}

networkSession = new QNetworkSession(config, this);
connect(networkSession, SIGNAL(opened()), this, SLOT(enableConnectButton()));

connectButton->setEnabled(false);
statusLabel->setText(tr("Opening network session."));
networkSession->open();
}

setWindowTitle(tr("FTP"));
}

Expand Down Expand Up @@ -169,6 +146,37 @@ void FtpWindow::connectOrDisconnect()
setCursor(Qt::WaitCursor);
#endif

if (!networkSession || !networkSession->isOpen()) {
if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
if (!networkSession) {
// Get saved network configuration
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
settings.beginGroup(QLatin1String("QtNetwork"));
const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
settings.endGroup();

// If the saved network configuration is not currently discovered use the system default
QNetworkConfiguration config = manager.configurationFromIdentifier(id);
if ((config.state() & QNetworkConfiguration::Discovered) !=
QNetworkConfiguration::Discovered) {
config = manager.defaultConfiguration();
}

networkSession = new QNetworkSession(config, this);
connect(networkSession, SIGNAL(opened()), this, SLOT(connectToFtp()));
connect(networkSession, SIGNAL(error(QNetworkSession::SessionError)), this, SLOT(enableConnectButton()));
}
connectButton->setEnabled(false);
statusLabel->setText(tr("Opening network session."));
networkSession->open();
return;
}
}
connectToFtp();
}

void FtpWindow::connectToFtp()
{
//![1]
ftp = new QFtp(this);
connect(ftp, SIGNAL(commandFinished(int,bool)),
Expand Down Expand Up @@ -407,7 +415,7 @@ void FtpWindow::enableConnectButton()
settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
settings.endGroup();

connectButton->setEnabled(networkSession->isOpen());
connectButton->setEnabled(true);
statusLabel->setText(tr("Please enter the name of an FTP server."));
}

3 changes: 3 additions & 0 deletions examples/network/qftp/ftpwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include <QDialog>
#include <QHash>
#include <QNetworkConfigurationManager>

QT_BEGIN_NAMESPACE
class QDialogButtonBox;
Expand Down Expand Up @@ -71,6 +72,7 @@ private slots:
void connectOrDisconnect();
void downloadFile();
void cancelDownload();
void connectToFtp();

void ftpCommandFinished(int commandId, bool error);
void addToList(const QUrlInfo &urlInfo);
Expand Down Expand Up @@ -101,6 +103,7 @@ private slots:
QFile *file;

QNetworkSession *networkSession;
QNetworkConfigurationManager manager;
//![1]
};

Expand Down
5 changes: 3 additions & 2 deletions src/corelib/kernel/qobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,15 @@ QObjectPrivate::~QObjectPrivate()
{
if (pendTimer) {
// unregister pending timers
if (threadData->eventDispatcher)
if (threadData && threadData->eventDispatcher)
threadData->eventDispatcher->unregisterTimers(q_ptr);
}

if (postedEvents)
QCoreApplication::removePostedEvents(q_ptr, 0);

threadData->deref();
if (threadData)
threadData->deref();

delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
#ifdef QT_JAMBI_BUILD
Expand Down
6 changes: 1 addition & 5 deletions src/gui/dialogs/dialogs.pri
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,7 @@ SOURCES += \
dialogs/qprintpreviewdialog.cpp

symbian:contains(QT_CONFIG, s60) {
contains(CONFIG, is_using_gnupoc) {
LIBS += -lcommondialogs
} else {
LIBS += -lCommonDialogs
}
LIBS += -lcommondialogs
SOURCES += dialogs/qfiledialog_symbian.cpp \
dialogs/qcolordialog_symbian.cpp
}
Expand Down
6 changes: 5 additions & 1 deletion src/gui/kernel/qapplication_s60.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,11 @@ QSymbianControl::~QSymbianControl()
{
// Ensure backing store is deleted before the top-level
// window is destroyed
qt_widget_private(qwidget)->topData()->backingStore.destroy();
QT_TRY {
qt_widget_private(qwidget)->topData()->backingStore.destroy();
} QT_CATCH(const std::exception&) {
// ignore exceptions, nothing can be done
}

if (S60->curWin == this)
S60->curWin = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/gui/painting/qgraphicssystemex_symbian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include <e32property.h>

#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL)
#include "private/qegl_p.h"
#endif

Expand All @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
static bool bcm2727Initialized = false;
static bool bcm2727 = false;

#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL)
typedef EGLBoolean (*NOK_resource_profiling)(EGLDisplay, EGLint, EGLint*, EGLint, EGLint*);
#define EGL_PROF_TOTAL_MEMORY_NOK 0x3070
#endif
Expand All @@ -69,7 +69,7 @@ bool QSymbianGraphicsSystemEx::hasBCM2727()
if (bcm2727Initialized)
return bcm2727;

#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL)
EGLDisplay display = QEgl::display();
#if 1
// Hacky but fast ~0ms.
Expand Down
4 changes: 2 additions & 2 deletions src/gui/styles/qs60style_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ class QS60StyleAnimation : public QObject

private: //data members
//TODO: consider changing these to non-pointers as the classes are rather small anyway
AnimationData *m_defaultData;
AnimationDataV2 *m_currentData;
QScopedPointer<AnimationData> m_defaultData;
QScopedPointer<AnimationDataV2> m_currentData;
};

#endif //Q_WS_S60
Expand Down
10 changes: 3 additions & 7 deletions src/gui/styles/qs60style_s60.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,12 @@ AnimationDataV2::~AnimationDataV2()

QS60StyleAnimation::QS60StyleAnimation(const QS60StyleEnums::SkinParts part, int frames, int interval)
{
QT_TRAP_THROWING(m_defaultData = new (ELeave) AnimationData(part, frames, interval));
QT_TRAP_THROWING(m_currentData = new (ELeave) AnimationDataV2(*m_defaultData));
m_defaultData.reset(new AnimationData(part, frames, interval));
m_currentData.reset(new AnimationDataV2(*m_defaultData));
}

QS60StyleAnimation::~QS60StyleAnimation()
{
delete m_currentData;
delete m_defaultData;
}

void QS60StyleAnimation::setAnimationObject(CAknBitmapAnimation* animation)
Expand All @@ -152,9 +150,7 @@ void QS60StyleAnimation::setAnimationObject(CAknBitmapAnimation* animation)

void QS60StyleAnimation::resetToDefaults()
{
delete m_currentData;
m_currentData = 0;
QT_TRAP_THROWING(m_currentData = new (ELeave) AnimationDataV2(*m_defaultData));
m_currentData.reset(new AnimationDataV2(*m_defaultData));
}

class QS60StyleModeSpecifics
Expand Down
6 changes: 1 addition & 5 deletions src/gui/styles/styles.pri
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ contains( styles, s60 ):contains(QT_CONFIG, s60) {
symbian {
SOURCES += styles/qs60style_s60.cpp
LIBS += -legul -lbmpanim
contains(CONFIG, is_using_gnupoc) {
LIBS += -laknicon -laknskins -laknskinsrv -lfontutils
} else {
LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils
}
LIBS += -laknicon -laknskins -laknskinsrv -lfontutils
} else {
SOURCES += styles/qs60style_simulated.cpp
RESOURCES += styles/qstyle_s60_simulated.qrc
Expand Down
6 changes: 1 addition & 5 deletions src/gui/util/util.pri
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,5 @@ symbian {
DEFINES += USE_SCHEMEHANDLER
}

contains(CONFIG, is_using_gnupoc) {
LIBS += -ldirectorylocalizer
} else {
LIBS += -lDirectoryLocalizer
}
LIBS += -ldirectorylocalizer
}
2 changes: 1 addition & 1 deletion src/gui/widgets/qlabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#endif

#ifdef Q_OS_SYMBIAN
#include "qt_s60_p.h"
#include "private/qt_s60_p.h"
#endif

QT_BEGIN_NAMESPACE
Expand Down
4 changes: 2 additions & 2 deletions src/network/access/qftp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1851,11 +1851,11 @@ int QFtp::cd(const QString &dir)
int QFtp::get(const QString &file, QIODevice *dev, TransferType type)
{
QStringList cmds;
cmds << QLatin1String("SIZE ") + file + QLatin1String("\r\n");
if (type == Binary)
cmds << QLatin1String("TYPE I\r\n");
else
cmds << QLatin1String("TYPE A\r\n");
cmds << QLatin1String("SIZE ") + file + QLatin1String("\r\n");
cmds << QLatin1String(d_func()->transferMode == Passive ? "PASV\r\n" : "PORT\r\n");
cmds << QLatin1String("RETR ") + file + QLatin1String("\r\n");
return d_func()->addCommand(new QFtpCommand(Get, cmds, dev));
Expand Down Expand Up @@ -2336,7 +2336,7 @@ void QFtpPrivate::_q_piError(int errorCode, const QString &text)

// non-fatal errors
if (c->command == QFtp::Get && pi.currentCommand().startsWith(QLatin1String("SIZE "))) {
pi.dtp.setBytesTotal(-1);
pi.dtp.setBytesTotal(0);
return;
} else if (c->command==QFtp::Put && pi.currentCommand().startsWith(QLatin1String("ALLO "))) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/network/access/qnetworkaccessbackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ class QNetworkAccessBackendFactoryData: public QList<QNetworkAccessBackendFactor

QMutex mutex;
//this is used to avoid (re)constructing factory data from destructors of other global classes
static QAtomicInt valid;
static QBasicAtomicInt valid;
};
Q_GLOBAL_STATIC(QNetworkAccessBackendFactoryData, factoryData)
QAtomicInt QNetworkAccessBackendFactoryData::valid;
QBasicAtomicInt QNetworkAccessBackendFactoryData::valid = Q_BASIC_ATOMIC_INITIALIZER(0);

QNetworkAccessBackendFactory::QNetworkAccessBackendFactory()
{
Expand Down
6 changes: 1 addition & 5 deletions src/plugins/bearer/symbian/symbian.pri
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ LIBS += -lcommdb \
-lefsrv \
-lnetmeta

is_using_gnupoc {
LIBS += -lconnmon
} else {
LIBS += -lConnMon
}
LIBS += -lconnmon

QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
target.path += $$[QT_INSTALL_PLUGINS]/bearer
Expand Down
Loading

0 comments on commit cf56956

Please sign in to comment.