Skip to content

Commit

Permalink
Merge branch '4.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Macieira committed Sep 1, 2009
2 parents 35d0565 + e4804c5 commit fb92097
Show file tree
Hide file tree
Showing 219 changed files with 5,028 additions and 4,739 deletions.
696 changes: 0 additions & 696 deletions LICENSE.GPL3

This file was deleted.

31 changes: 25 additions & 6 deletions bin/patch_capabilities.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
#
#######################################################################

sub Usage() {
print("This script can be used to set capabilities of all binaries\n");
print("specified for deployment in a .pkg file.\n");
print("If no capabilities are given, the binaries will be given the\n");
print("capabilities supported by self-signed certificates.\n");
print("\nUsage: patch_capabilities.pl pkg_filename [target-platform] [capability list]\n");
print(" If template .pkg file is given, next agrument must be 'target-platform'.\n");
print("\nE.g. patch_capabilities.pl myapp_template.pkg release-armv5 \"All -TCB\"\n");
exit();
}

my @capabilitiesToSet = ("LocalServices", "NetworkServices", "ReadUserData", "UserEnvironment", "WriteUserData");

# If arguments were given to the script,
Expand All @@ -15,6 +26,19 @@
# Parse the first given script argument as a ".pkg" file name.
my $pkgFileName = shift(@ARGV);

# Check if using template .pkg and do preprocessing if needed
if (($pkgFileName =~ m|_template\.pkg$|i) && -r($pkgFileName))
{
my $target;
unless ($target = shift(@ARGV))
{
Usage();
}

system ("createpackage.bat -p ".$pkgFileName." ".$target);
$pkgFileName =~ s/_template\.pkg/_${target}\.pkg/;
}

# If the specified ".pkg" file exists (and can be read),
if (($pkgFileName =~ m|\.pkg$|i) && -r($pkgFileName))
{
Expand Down Expand Up @@ -98,10 +122,5 @@
}
else
{
print("This script can be used to set capabilities of all binaries\n");
print("specified for deployment in a .pkg file.\n");
print("If no capabilities are given, the binaries will be given the\n");
print("capabilities supported by self-signed certificates.\n");
print("\nUsage: patch_capabilities.pl pkg_filename [capability list]\n");
print("\nE.g. patch_capabilities.pl myapp_armv5_urel.pkg \"All -TCB\"\n");
Usage();
}
41 changes: 41 additions & 0 deletions config.tests/unix/alsa/alsatest.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <alsa/asoundlib.h>
int main(int argc,char **argv)
{
Expand Down
41 changes: 41 additions & 0 deletions config.tests/unix/iodbc/iodbc.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <sql.h>
#include <sqlext.h>

Expand Down
41 changes: 41 additions & 0 deletions config.tests/unix/openvg/openvg.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

// There is some variation in OpenVG engines as to what case
// the VG includes use. The Khronos reference implementation
// for OpenVG 1.1 uses upper case, so we treat that as canonical.
Expand Down
15 changes: 10 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3842,16 +3842,21 @@ if [ "$Edition" = "NokiaInternalBuild" ]; then
elif [ "$Edition" = "OpenSource" ]; then
while true; do
echo "You are licensed to use this software under the terms of"
echo "the GNU General Public License (GPL) versions 3."
echo "You are also licensed to use this software under the terms of"
echo "the Lesser GNU General Public License (LGPL) versions 2.1."
if [ -e "$relpath/LICENSE.GPL3" ]; then
echo "You are also licensed to use this software under the terms of"
echo "the GNU General Public License (GPL) versions 3."
affix="either"
else
affix="the"
fi
echo
affix="either"
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
echo "You have already accepted the terms of the $LicenseType license."
echo "You have already accepted the terms of the $LicenseType license."
acceptance=yes
else
echo "Type '3' to view the GNU General Public License version 3."
test -e "$relpath/LICENSE.GPL3" && \
echo "Type '3' to view the GNU General Public License version 3."
echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
echo "Type 'yes' to accept this license offer."
echo "Type 'no' to decline this license offer."
Expand Down
14 changes: 10 additions & 4 deletions demos/boxes/qtbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void ItemBase::duplicateSelectedItems(QGraphicsScene *scene)
selected = scene->selectedItems();

foreach (QGraphicsItem *item, selected) {
ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase)
scene->addItem(itemBase->createNew(itemBase->m_size, itemBase->pos().x() + itemBase->m_size, itemBase->pos().y()));
}
Expand All @@ -137,7 +137,7 @@ void ItemBase::deleteSelectedItems(QGraphicsScene *scene)
selected = scene->selectedItems();

foreach (QGraphicsItem *item, selected) {
ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase)
delete itemBase;
}
Expand All @@ -152,7 +152,7 @@ void ItemBase::growSelectedItems(QGraphicsScene *scene)
selected = scene->selectedItems();

foreach (QGraphicsItem *item, selected) {
ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase) {
itemBase->prepareGeometryChange();
itemBase->m_size *= 2;
Expand All @@ -171,7 +171,7 @@ void ItemBase::shrinkSelectedItems(QGraphicsScene *scene)
selected = scene->selectedItems();

foreach (QGraphicsItem *item, selected) {
ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase) {
itemBase->prepareGeometryChange();
itemBase->m_size /= 2;
Expand Down Expand Up @@ -257,6 +257,12 @@ void ItemBase::wheelEvent(QGraphicsSceneWheelEvent *event)
m_size = MIN_ITEM_SIZE;
}

int ItemBase::type() const
{
return Type;
}


bool ItemBase::isInResizeArea(const QPointF &pos)
{
return (-pos.y() < pos.x() - m_size + 9);
Expand Down
6 changes: 4 additions & 2 deletions demos/boxes/qtbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
#include <QtGui/qvector3d.h>
#include "glbuffers.h"

class ItemBase : public QObject, public QGraphicsItem
class ItemBase : public QGraphicsItem
{
Q_OBJECT
public:
enum { Type = UserType + 1 };

ItemBase(int size, int x, int y);
virtual ~ItemBase();
virtual QRectF boundingRect() const;
Expand All @@ -64,6 +65,7 @@ class ItemBase : public QObject, public QGraphicsItem
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
virtual void keyPressEvent(QKeyEvent *event);
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
virtual int type() const;
bool isInResizeArea(const QPointF &pos);

static void duplicateSelectedItems(QGraphicsScene *scene);
Expand Down
13 changes: 8 additions & 5 deletions demos/sub-attaq/graphicsscene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "animationmanager.h"
#include "qanimationstate.h"
#include "progressitem.h"
#include "textinformationitem.h"

//Qt
#include <QtCore/QPropertyAnimation>
Expand Down Expand Up @@ -112,6 +113,8 @@ GraphicsScene::GraphicsScene(int x, int y, int width, int height, Mode mode)
//The item that display score and level
progressItem = new ProgressItem(backgroundItem);

textInformationItem = new TextInformationItem(backgroundItem);
textInformationItem->hide();
//We create the boat
boat = new Boat();
addItem(boat);
Expand Down Expand Up @@ -244,15 +247,15 @@ void GraphicsScene::setupScene(const QList<QAction *> &actions)
lettersFadingState->setAnimation(lettersGroupFading);

//if new game then we fade out the welcome screen and start playing
lettersMovingState->addTransition(newAction, SIGNAL(triggered()),lettersFadingState);
lettersFadingState->addTransition(lettersFadingState, SIGNAL(animationFinished()),gameState);
lettersMovingState->addTransition(newAction, SIGNAL(triggered()), lettersFadingState);
lettersFadingState->addTransition(lettersFadingState, SIGNAL(animationFinished()), gameState);

//New Game is triggered then player start playing
gameState->addTransition(newAction, SIGNAL(triggered()),gameState);
gameState->addTransition(newAction, SIGNAL(triggered()), gameState);

//Wanna quit, then connect to CTRL+Q
gameState->addTransition(quitAction, SIGNAL(triggered()),final);
lettersMovingState->addTransition(quitAction, SIGNAL(triggered()),final);
gameState->addTransition(quitAction, SIGNAL(triggered()), final);
lettersMovingState->addTransition(quitAction, SIGNAL(triggered()), final);

//Welcome screen is the initial state
machine->setInitialState(lettersMovingState);
Expand Down
2 changes: 2 additions & 0 deletions demos/sub-attaq/graphicsscene.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Torpedo;
class Bomb;
class PixmapItem;
class ProgressItem;
class TextInformationItem;
QT_BEGIN_NAMESPACE
class QAction;
QT_END_NAMESPACE
Expand Down Expand Up @@ -108,6 +109,7 @@ private slots:
Mode mode;
PixmapItem *backgroundItem;
ProgressItem *progressItem;
TextInformationItem *textInformationItem;
QAction * newAction;
QAction * quitAction;
Boat *boat;
Expand Down
25 changes: 20 additions & 5 deletions demos/sub-attaq/states.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "torpedo.h"
#include "animationmanager.h"
#include "progressitem.h"
#include "textinformationitem.h"

//Qt
#include <QtGui/QMessageBox>
Expand Down Expand Up @@ -226,8 +227,15 @@ void LostState::onEntry(QEvent *)
//We clear the scene
scene->clearScene();

//we have only one view
QMessageBox::information(scene->views().at(0),"You lose",message);
//We inform the player
scene->textInformationItem->setMessage(message);
scene->textInformationItem->show();
}

void LostState::onExit(QEvent *)
{
//we hide the information
scene->textInformationItem->hide();
}

/** Win State */
Expand All @@ -242,7 +250,7 @@ void WinState::onEntry(QEvent *)

QString message;
if (scene->levelsData.size() - 1 != game->currentLevel) {
message = QString("You win the level %1. Your score is %2.\nPress Space to continue after closing this dialog.").arg(game->currentLevel+1).arg(game->score);
message = QString("You win the level %1. Your score is %2.\nPress Space to continue.").arg(game->currentLevel+1).arg(game->score);
//We increment the level number
game->currentLevel++;
} else {
Expand All @@ -253,8 +261,15 @@ void WinState::onEntry(QEvent *)
game->score = 0;
}

//we have only one view
QMessageBox::information(scene->views().at(0),"You win",message);
//We inform the player
scene->textInformationItem->setMessage(message);
scene->textInformationItem->show();
}

void WinState::onExit(QEvent *)
{
//we hide the information
scene->textInformationItem->hide();
}

/** UpdateScore State */
Expand Down
Loading

0 comments on commit fb92097

Please sign in to comment.