summaryrefslogtreecommitdiff
path: root/src/plugins/designer/syncqtheader.sh
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-01-27 11:19:41 +0100
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-01-27 11:19:41 +0100
commit6cf47088fa6b490345ad29b23e7531b10592c978 (patch)
treea5a20de08e6112804c0131708d7dea5f52147b80 /src/plugins/designer/syncqtheader.sh
parent114363677505011b3dd5a8cb5b64ea927f3cebf2 (diff)
downloadqt-creator-6cf47088fa6b490345ad29b23e7531b10592c978.tar.gz
Fixes: Ship Qt Designer private Headers
Task: 205821 Details: Added script to copy them over, swapping license headers, added directory qt_private.
Diffstat (limited to 'src/plugins/designer/syncqtheader.sh')
-rwxr-xr-xsrc/plugins/designer/syncqtheader.sh69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/plugins/designer/syncqtheader.sh b/src/plugins/designer/syncqtheader.sh
new file mode 100755
index 0000000000..b114a8f6b4
--- /dev/null
+++ b/src/plugins/designer/syncqtheader.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# **************************************************************************
+#
+# This file is part of Qt Creator
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+#
+# Contact: Qt Software Information (qt-info@nokia.com)
+#
+#
+# Non-Open Source Usage
+#
+# Licensees may use this file in accordance with the Qt Beta Version
+# License Agreement, Agreement version 2.2 provided with the Software or,
+# alternatively, in accordance with the terms contained in a written
+# agreement between you and Nokia.
+#
+# GNU General Public License Usage
+#
+# Alternatively, this file may be used under the terms of the GNU General
+# Public License versions 2.0 or 3.0 as published by the Free Software
+# Foundation and appearing in the file LICENSE.GPL included in the packaging
+# of this file. Please review the following information to ensure GNU
+# General Public Licensing requirements will be met:
+#
+# http://www.fsf.org/licensing/licenses/info/GPLv2.html and
+# http://www.gnu.org/copyleft/gpl.html.
+#
+# In addition, as a special exception, Nokia gives you certain additional
+# rights. These rights are described in the Nokia Qt GPL Exception
+# version 1.3, included in the file GPL_EXCEPTION.txt in this package.
+#
+# ***************************************************************************/
+
+# Internal utility script that synchronizes the Qt Designer private headers
+# used by the Qt Designer plugin (located in the qt_private) directory
+# with the Qt source tree pointed to by the environment variable QTDIR.
+
+REQUIRED_HEADERS="pluginmanager_p.h iconloader_p.h qdesigner_formwindowmanager_p.h formwindowbase_p.h
+abstractnewformwidget_p.h qtresourcemodel_p.h abstractoptionspage_p.h
+shared_global_p.h abstractsettings_p.h qdesigner_integration_p.h"
+
+echo Using $QTDIR
+
+syncHeader()
+{
+ HDR=$1
+ # Locate the Designer header: look in lib/shared or SDK
+ QTHDR=$QTDIR/tools/designer/src/lib/shared/$HDR
+ if [ ! -f $QTHDR ]
+ then
+ QTHDR=$QTDIR/tools/designer/src/lib/sdk/$HDR
+ fi
+ echo Syncing $QTHDR
+
+ [ -f $QTHDR ] || { echo "$HDR does not exist" ; exit 1 ; }
+
+ TARGET=qt_private/$HDR
+
+ # Exchange license header
+ head -n 32 formwindowfile.h > $TARGET || exit 1
+ tail -n +11 $QTHDR >> $TARGET || exit 1
+}
+
+for H in $REQUIRED_HEADERS
+do
+ syncHeader $H
+done