Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

This commit is contained in:
dt
2009-01-23 11:54:22 +01:00
59 changed files with 1378 additions and 212 deletions

View File

@@ -7,7 +7,7 @@ unix {
} }
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
QCH_FILE = $$OUT_PWD/doc/qtcreator.qch QCH_FILE = $$OUT_PWD/share/doc/qtcreator/qtcreator.qch
unix { unix {
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
@@ -21,6 +21,11 @@ qch_docs.commands = $$HELPGENERATOR -o $$QCH_FILE $$QHP_FILE
qch_docs.depends += html_docs qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE qch_docs.files = $$QCH_FILE
linux-* {
qch_docs.path = /share/doc/qtcreator
INSTALLS += qch_docs
}
macx { macx {
cp_docs.commands = $${QMAKE_COPY_DIR} $${OUT_PWD}/doc $${OUT_PWD}/bin/QtCreator.app/Contents/Resources cp_docs.commands = $${QMAKE_COPY_DIR} $${OUT_PWD}/doc $${OUT_PWD}/bin/QtCreator.app/Contents/Resources
cp_docs.depends += qch_docs cp_docs.depends += qch_docs

View File

@@ -5,10 +5,10 @@ count(TOO_OLD_LIST, 1) {
error("Use at least Qt 4.5.") error("Use at least Qt 4.5.")
} }
include(doc/doc.pri)
include(share/share.pri)
TEMPLATE = subdirs TEMPLATE = subdirs
CONFIG += ordered CONFIG += ordered
SUBDIRS = src SUBDIRS = src
include(doc/doc.pri)

View File

@@ -76,20 +76,6 @@ build() {
ret=$?; [ ${ret} = 0 ] || exit ${ret} ret=$?; [ ${ret} = 0 ] || exit ${ret}
} }
fix_rpath() {
folder=$1
pattern=$2
rpath=$3
(
cd "${destdir}" || die "cd failed"
while read file ; do
echo "Fixing ${file}"
chrpath -r "${rpath}" "${file}" 2>&1 | sed 's/^/\t/'
done < <(find "${folder}" -type f -name "${pattern}")
)
ret=$?; [ ${ret} = 0 ] || exit ${ret}
}
inst() { inst() {
( (
cd "${dir}" || die "cd failed" cd "${dir}" || die "cd failed"
@@ -98,22 +84,13 @@ inst() {
env -i "${MAKE}" install || die "make install failed" env -i "${MAKE}" install || die "make install failed"
fi fi
# Fix rpath's
cd "${destdir}" || die "cd failed" cd "${destdir}" || die "cd failed"
find bin -mindepth 1 -maxdepth 1 -type f -perm -100 | xargs -n 1 chrpath -r '$ORIGIN/../lib'
# Fix files bin/* find lib -mindepth 1 -maxdepth 1 -type f -perm -100 | xargs -n 1 chrpath -r '$ORIGIN'
fix_rpath bin '*' '$ORIGIN/../lib' find . -mindepth 3 -maxdepth 3 -type f -perm -100 | xargs -n 1 chrpath -r '$ORIGIN/../../lib'
find . -mindepth 4 -maxdepth 4 -type f -perm -100 | xargs -n 1 chrpath -r '$ORIGIN/../../../lib'
# Fix files lib/*.so find . -mindepth 5 -maxdepth 5 -type f -perm -100 | xargs -n 1 chrpath -r '$ORIGIN/../../../../lib'
fix_rpath lib '*.so.?.?.?' '$ORIGIN'
fix_rpath lib '*.so.?.?.?.debug' '$ORIGIN'
# Fix files examples/tools/*/*/*.so
fix_rpath examples/tools '*.so' '$ORIGIN/../../../lib'
fix_rpath examples/tools '*.so.debug' '$ORIGIN/../../../lib'
# Fix files plugins/*/*.so
fix_rpath plugins '*.so' '$ORIGIN/../../lib'
fix_rpath plugins '*.so.debug' '$ORIGIN/../../lib'
) )
ret=$?; [ ${ret} = 0 ] || exit ${ret} ret=$?; [ ${ret} = 0 ] || exit ${ret}
} }

81
share/share.pri Normal file
View File

@@ -0,0 +1,81 @@
macx {
SNIPPETS.path = Contents/Resources
SNIPPETS.files = $$PWD/qtcreator/snippets
TEMPLATES.path = Contents/Resources
TEMPLATES.files = $$PWD/qtcreator/templates
DESIGNER.path = Contents/Resources
DESIGNER.files = $$PWD/qtcreator/designer
SCHEMES.path = Contents/Resources
SCHEMES.files = $$PWD/qtcreator/schemes
GDBDEBUGGER.path = Contents/Resources
GDBDEBUGGER.files = $$PWD/qtcreator/gdbmacros
LICENSE.path = Contents/Resources
LICENSE.files = $$PWD/qtcreator/license.txt
RUNINTERMINAL.path = Contents/Resources
RUNINTERMINAL.files = $$PWD/qtcreator/runInTerminal.command
QMAKE_BUNDLE_DATA += SNIPPETS TEMPLATES DESIGNER SCHEMES GDBDEBUGGER LICENSE RUNINTERMINAL
QMAKE_INFO_PLIST = $$PWD/qtcreator/info.plist
}
win32 {
# make sure the resources are in place
!exists($$OUT_PWD/app.pro) {
unix:SEPARATOR = ;
win32:SEPARATOR = &
# we are shadow build
COPYSRC = snippets \
templates \
designer \
schemes \
gdbmacros
COPYDEST = $${OUT_PWD}/../../bin
win32:COPYDEST ~= s|/+|\|
for(tmp,COPYSRC) {
REALSRC = $$PWD/$$tmp
REALDEST = $$COPYDEST/$$tmp
win32:tmp ~= s|/+|\|
win32:REALSRC ~= s|/+|\|
win32:REALDEST ~= s|/+|\|
QMAKE_POST_LINK += $${QMAKE_COPY_DIR} $${REALSRC} $${REALDEST} $$SEPARATOR
}
}
}
linux-* {
licenses.files += $$PWD/qtcreator/license.txt
licenses.path = /share/qtcreator
keymaps.files += $$PWD/qtcreator/schemes/MS_Visual_C++.kms
keymaps.files += $$PWD/qtcreator/schemes/Xcode.kms
keymaps.path = /share/qtcreator/schemes
gdbsupport.files += $$PWD/qtcreator/gdbmacros/GPL_EXCEPTION.TXT
gdbsupport.files += $$PWD/qtcreator/gdbmacros/gdbmacros.cpp
gdbsupport.files += $$PWD/qtcreator/gdbmacros/gdbmacros.pro
gdbsupport.path = /share/qtcreator/gdbmacros
designertemplates.files += $$PWD/qtcreator/designer/templates.xml
designertemplates.files += $$PWD/qtcreator/designer/templates/*
designertemplates.path = /share/qtcreator/designer/templates
snippets.files += $$PWD/qtcreator/snippets/*.snp
snippets.path = /share/qtcreator/snippets
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget_form.h
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/main.cpp
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget.cpp
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget.h
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/widget.ui
projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget_form.cpp
projecttemplates.path = /share/qtcreator/templates/qt4project
INSTALLS += \
licenses \
keymaps \
gdbsupport \
designertemplates \
snippets \
projecttemplates
}

View File

@@ -60,7 +60,8 @@ QT_BEGIN_NAMESPACE
class HelpNetworkReply : public QNetworkReply class HelpNetworkReply : public QNetworkReply
{ {
public: public:
HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData); HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData,
const QString &mimeType);
virtual void abort(); virtual void abort();
@@ -76,13 +77,13 @@ private:
}; };
HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request, HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
const QByteArray &fileData) const QByteArray &fileData, const QString &mimeType)
: data(fileData), origLen(fileData.length()) : data(fileData), origLen(fileData.length())
{ {
setRequest(request); setRequest(request);
setOpenMode(QIODevice::ReadOnly); setOpenMode(QIODevice::ReadOnly);
setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("text/html")); setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen)); setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen));
QTimer::singleShot(0, this, SIGNAL(metaDataChanged())); QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
QTimer::singleShot(0, this, SIGNAL(readyRead())); QTimer::singleShot(0, this, SIGNAL(readyRead()));
@@ -127,9 +128,23 @@ HelpNetworkAccessManager::HelpNetworkAccessManager(QHelpEngine *engine,
QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op, QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op,
const QNetworkRequest &request, QIODevice *outgoingData) const QNetworkRequest &request, QIODevice *outgoingData)
{ {
const QString scheme = request.url().scheme(); const QString& scheme = request.url().scheme();
if (scheme == QLatin1String("qthelp") || scheme == QLatin1String("about")) { if (scheme == QLatin1String("qthelp") || scheme == QLatin1String("about")) {
return new HelpNetworkReply(request, helpEngine->fileData(request.url())); const QUrl& url = request.url();
QString mimeType = url.toString();
if (mimeType.endsWith(QLatin1String(".svg"))
|| mimeType.endsWith(QLatin1String(".svgz"))) {
mimeType = QLatin1String("image/svg+xml");
}
else if (mimeType.endsWith(QLatin1String(".css"))) {
mimeType = QLatin1String("text/css");
}
else if (mimeType.endsWith(QLatin1String(".js"))) {
mimeType = QLatin1String("text/javascript");
} else {
mimeType = QLatin1String("text/html");
}
return new HelpNetworkReply(request, helpEngine->fileData(url), mimeType);
} }
return QNetworkAccessManager::createRequest(op, request, outgoingData); return QNetworkAccessManager::createRequest(op, request, outgoingData);
} }

View File

@@ -16,6 +16,9 @@ linux-* {
ISGCC33=$$(GCC33) ISGCC33=$$(GCC33)
!equals(ISGCC33, 1):QT += svg dbus !equals(ISGCC33, 1):QT += svg dbus
target.path = /bin
INSTALLS += target
} }
TEMPLATE = app TEMPLATE = app
@@ -25,55 +28,7 @@ DESTDIR = ../../bin
SOURCES += main.cpp SOURCES += main.cpp
macx { include(../rpath.pri)
SNIPPETS.path = Contents/Resources
SNIPPETS.files = $$IDE_SOURCE_TREE/bin/snippets
TEMPLATES.path = Contents/Resources
TEMPLATES.files = $$IDE_SOURCE_TREE/bin/templates
DESIGNER.path = Contents/Resources
DESIGNER.files = $$IDE_SOURCE_TREE/bin/designer
SCHEMES.path = Contents/Resources
SCHEMES.files = $$IDE_SOURCE_TREE/bin/schemes
GDBDEBUGGER.path = Contents/Resources
GDBDEBUGGER.files = $$IDE_SOURCE_TREE/bin/gdbmacros
LICENSE.path = Contents/Resources
LICENSE.files = $$IDE_SOURCE_TREE/bin/license.txt
RUNINTERMINAL.path = Contents/Resources
RUNINTERMINAL.files = $$IDE_SOURCE_TREE/bin/runInTerminal.command
QMAKE_BUNDLE_DATA += SNIPPETS TEMPLATES DESIGNER SCHEMES GDBDEBUGGER LICENSE RUNINTERMINAL
QMAKE_INFO_PLIST = $$PWD/Info.plist
}
!macx {
# make sure the resources are in place
!exists($$OUT_PWD/app.pro) {
unix:SEPARATOR = ;
win32:SEPARATOR = &
# we are shadow build
COPYSRC = snippets \
templates \
designer \
schemes \
gdbmacros
COPYDEST = $${OUT_PWD}/../../bin
win32:COPYDEST ~= s|/+|\|
for(tmp,COPYSRC) {
REALSRC = $$IDE_SOURCE_TREE/bin/$$tmp
REALDEST = $$COPYDEST/$$tmp
win32:tmp ~= s|/+|\|
win32:REALSRC ~= s|/+|\|
win32:REALDEST ~= s|/+|\|
QMAKE_POST_LINK += $${QMAKE_COPY_DIR} $${REALSRC} $${REALDEST} $$SEPARATOR
}
}
}
linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
QMAKE_RPATHDIR += \$\$ORIGIN/../lib
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
QMAKE_RPATHDIR =
}
win32 { win32 {
RC_FILE = qtcreator.rc RC_FILE = qtcreator.rc
@@ -82,3 +37,4 @@ win32 {
macx { macx {
ICON = qtcreator.icns ICON = qtcreator.icns
} }

View File

@@ -180,12 +180,16 @@ static inline QStringList getPluginPaths()
QDir rootDir = QApplication::applicationDirPath(); QDir rootDir = QApplication::applicationDirPath();
rootDir.cdUp(); rootDir.cdUp();
const QString rootDirPath = rootDir.canonicalPath(); const QString rootDirPath = rootDir.canonicalPath();
// 1) "lib" dir // 1) "plugins" (Win/Linux)
QString pluginPath = rootDirPath; QString pluginPath = rootDirPath;
pluginPath += QDir::separator(); pluginPath += QDir::separator();
pluginPath += QLatin1String("lib"); pluginPath += QLatin1String("lib");
pluginPath += QDir::separator();
pluginPath += QLatin1String("qtcreator");
pluginPath += QDir::separator();
pluginPath += QLatin1String("plugins");
rc.push_back(pluginPath); rc.push_back(pluginPath);
// 2) "PlugIns" // 2) "PlugIns" (OS X)
pluginPath = rootDirPath; pluginPath = rootDirPath;
pluginPath += QDir::separator(); pluginPath += QDir::separator();
pluginPath += QLatin1String("PlugIns"); pluginPath += QLatin1String("PlugIns");

View File

@@ -148,7 +148,7 @@ QString CoreImpl::resourcePath() const
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
return QDir::cleanPath(QCoreApplication::applicationDirPath()+QLatin1String("/../Resources")); return QDir::cleanPath(QCoreApplication::applicationDirPath()+QLatin1String("/../Resources"));
#else #else
return QDir::cleanPath(QCoreApplication::applicationDirPath()); return QDir::cleanPath(QCoreApplication::applicationDirPath())+"/../share/qtcreator";
#endif #endif
} }

View File

@@ -476,43 +476,43 @@ void MainWindow::registerDefaultActions()
cmd = createSeparator(am, this, QLatin1String("QtCreator.Edit.Sep.Advanced"), m_globalContext); cmd = createSeparator(am, this, QLatin1String("QtCreator.Edit.Sep.Advanced"), m_globalContext);
medit->addAction(cmd, Constants::G_EDIT_ADVANCED); medit->addAction(cmd, Constants::G_EDIT_ADVANCED);
//Tools menu separators // Tools menu separators
cmd = createSeparator(am, this, QLatin1String("QtCreator.Tools.Sep.Options"), m_globalContext); cmd = createSeparator(am, this, QLatin1String("QtCreator.Tools.Sep.Options"), m_globalContext);
mtools->addAction(cmd, Constants::G_DEFAULT_THREE); mtools->addAction(cmd, Constants::G_DEFAULT_THREE);
//Return to editor shortcut: Note this requires Qt to fix up // Return to editor shortcut: Note this requires Qt to fix up
// handling of shortcut overrides in menus, item views, combos.... // handling of shortcut overrides in menus, item views, combos....
m_focusToEditor = new QShortcut(this); m_focusToEditor = new QShortcut(this);
cmd = am->registerShortcut(m_focusToEditor, Constants::S_RETURNTOEDITOR, m_globalContext); cmd = am->registerShortcut(m_focusToEditor, Constants::S_RETURNTOEDITOR, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence(Qt::Key_Escape)); cmd->setDefaultKeySequence(QKeySequence(Qt::Key_Escape));
connect(m_focusToEditor, SIGNAL(activated()), this, SLOT(setFocusToEditor())); connect(m_focusToEditor, SIGNAL(activated()), this, SLOT(setFocusToEditor()));
//New File Action // New File Action
m_newAction = new QAction(QIcon(Constants::ICON_NEWFILE), tr("&New..."), this); m_newAction = new QAction(QIcon(Constants::ICON_NEWFILE), tr("&New..."), this);
cmd = am->registerAction(m_newAction, Constants::NEW, m_globalContext); cmd = am->registerAction(m_newAction, Constants::NEW, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::New); cmd->setDefaultKeySequence(QKeySequence::New);
mfile->addAction(cmd, Constants::G_FILE_NEW); mfile->addAction(cmd, Constants::G_FILE_NEW);
connect(m_newAction, SIGNAL(triggered()), this, SLOT(newFile())); connect(m_newAction, SIGNAL(triggered()), this, SLOT(newFile()));
//Open Action // Open Action
m_openAction = new QAction(QIcon(Constants::ICON_OPENFILE), tr("&Open..."), this); m_openAction = new QAction(QIcon(Constants::ICON_OPENFILE), tr("&Open..."), this);
cmd = am->registerAction(m_openAction, Constants::OPEN, m_globalContext); cmd = am->registerAction(m_openAction, Constants::OPEN, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::Open); cmd->setDefaultKeySequence(QKeySequence::Open);
mfile->addAction(cmd, Constants::G_FILE_OPEN); mfile->addAction(cmd, Constants::G_FILE_OPEN);
connect(m_openAction, SIGNAL(triggered()), this, SLOT(openFile())); connect(m_openAction, SIGNAL(triggered()), this, SLOT(openFile()));
//Open With Action // Open With Action
m_openWithAction = new QAction(tr("&Open With..."), this); m_openWithAction = new QAction(tr("&Open With..."), this);
cmd = am->registerAction(m_openWithAction, Constants::OPEN_WITH, m_globalContext); cmd = am->registerAction(m_openWithAction, Constants::OPEN_WITH, m_globalContext);
mfile->addAction(cmd, Constants::G_FILE_OPEN); mfile->addAction(cmd, Constants::G_FILE_OPEN);
connect(m_openWithAction, SIGNAL(triggered()), this, SLOT(openFileWith())); connect(m_openWithAction, SIGNAL(triggered()), this, SLOT(openFileWith()));
//File->Recent Files Menu // File->Recent Files Menu
ActionContainer *ac = am->createMenu(Constants::M_FILE_RECENTFILES); ActionContainer *ac = am->createMenu(Constants::M_FILE_RECENTFILES);
mfile->addMenu(ac, Constants::G_FILE_OPEN); mfile->addMenu(ac, Constants::G_FILE_OPEN);
ac->menu()->setTitle(tr("Recent Files")); ac->menu()->setTitle(tr("Recent Files"));
//Save Action // Save Action
QAction *tmpaction = new QAction(QIcon(Constants::ICON_SAVEFILE), tr("&Save"), this); QAction *tmpaction = new QAction(QIcon(Constants::ICON_SAVEFILE), tr("&Save"), this);
cmd = am->registerAction(tmpaction, Constants::SAVE, m_globalContext); cmd = am->registerAction(tmpaction, Constants::SAVE, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::Save); cmd->setDefaultKeySequence(QKeySequence::Save);
@@ -520,7 +520,7 @@ void MainWindow::registerDefaultActions()
cmd->setDefaultText(tr("&Save")); cmd->setDefaultText(tr("&Save"));
mfile->addAction(cmd, Constants::G_FILE_SAVE); mfile->addAction(cmd, Constants::G_FILE_SAVE);
//Save As Action // Save As Action
tmpaction = new QAction(tr("Save &As..."), this); tmpaction = new QAction(tr("Save &As..."), this);
cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext); cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext);
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
@@ -530,7 +530,7 @@ void MainWindow::registerDefaultActions()
cmd->setDefaultText(tr("Save &As...")); cmd->setDefaultText(tr("Save &As..."));
mfile->addAction(cmd, Constants::G_FILE_SAVE); mfile->addAction(cmd, Constants::G_FILE_SAVE);
//SaveAll Action // SaveAll Action
m_saveAllAction = new QAction(tr("Save A&ll"), this); m_saveAllAction = new QAction(tr("Save A&ll"), this);
cmd = am->registerAction(m_saveAllAction, Constants::SAVEALL, m_globalContext); cmd = am->registerAction(m_saveAllAction, Constants::SAVEALL, m_globalContext);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
@@ -539,19 +539,19 @@ void MainWindow::registerDefaultActions()
mfile->addAction(cmd, Constants::G_FILE_SAVE); mfile->addAction(cmd, Constants::G_FILE_SAVE);
connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll())); connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll()));
//Print Action // Print Action
tmpaction = new QAction(tr("&Print..."), this); tmpaction = new QAction(tr("&Print..."), this);
cmd = am->registerAction(tmpaction, Constants::PRINT, m_globalContext); cmd = am->registerAction(tmpaction, Constants::PRINT, m_globalContext);
mfile->addAction(cmd, Constants::G_FILE_PRINT); mfile->addAction(cmd, Constants::G_FILE_PRINT);
//Exit Action // Exit Action
m_exitAction = new QAction(tr("E&xit"), this); m_exitAction = new QAction(tr("E&xit"), this);
cmd = am->registerAction(m_exitAction, Constants::EXIT, m_globalContext); cmd = am->registerAction(m_exitAction, Constants::EXIT, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q")));
mfile->addAction(cmd, Constants::G_FILE_OTHER); mfile->addAction(cmd, Constants::G_FILE_OTHER);
connect(m_exitAction, SIGNAL(triggered()), this, SLOT(exit())); connect(m_exitAction, SIGNAL(triggered()), this, SLOT(exit()));
//Undo Action // Undo Action
tmpaction = new QAction(QIcon(Constants::ICON_UNDO), tr("&Undo"), this); tmpaction = new QAction(QIcon(Constants::ICON_UNDO), tr("&Undo"), this);
cmd = am->registerAction(tmpaction, Constants::UNDO, m_globalContext); cmd = am->registerAction(tmpaction, Constants::UNDO, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::Undo); cmd->setDefaultKeySequence(QKeySequence::Undo);
@@ -559,7 +559,7 @@ void MainWindow::registerDefaultActions()
cmd->setDefaultText(tr("&Undo")); cmd->setDefaultText(tr("&Undo"));
medit->addAction(cmd, Constants::G_EDIT_UNDOREDO); medit->addAction(cmd, Constants::G_EDIT_UNDOREDO);
//Redo Action // Redo Action
tmpaction = new QAction(QIcon(Constants::ICON_REDO), tr("&Redo"), this); tmpaction = new QAction(QIcon(Constants::ICON_REDO), tr("&Redo"), this);
cmd = am->registerAction(tmpaction, Constants::REDO, m_globalContext); cmd = am->registerAction(tmpaction, Constants::REDO, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::Redo); cmd->setDefaultKeySequence(QKeySequence::Redo);
@@ -567,37 +567,37 @@ void MainWindow::registerDefaultActions()
cmd->setDefaultText(tr("&Redo")); cmd->setDefaultText(tr("&Redo"));
medit->addAction(cmd, Constants::G_EDIT_UNDOREDO); medit->addAction(cmd, Constants::G_EDIT_UNDOREDO);
//Cut Action // Cut Action
tmpaction = new QAction(QIcon(Constants::ICON_CUT), tr("Cu&t"), this); tmpaction = new QAction(QIcon(Constants::ICON_CUT), tr("Cu&t"), this);
cmd = am->registerAction(tmpaction, Constants::CUT, m_globalContext); cmd = am->registerAction(tmpaction, Constants::CUT, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::Cut); cmd->setDefaultKeySequence(QKeySequence::Cut);
medit->addAction(cmd, Constants::G_EDIT_COPYPASTE); medit->addAction(cmd, Constants::G_EDIT_COPYPASTE);
//Copy Action // Copy Action
tmpaction = new QAction(QIcon(Constants::ICON_COPY), tr("&Copy"), this); tmpaction = new QAction(QIcon(Constants::ICON_COPY), tr("&Copy"), this);
cmd = am->registerAction(tmpaction, Constants::COPY, m_globalContext); cmd = am->registerAction(tmpaction, Constants::COPY, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::Copy); cmd->setDefaultKeySequence(QKeySequence::Copy);
medit->addAction(cmd, Constants::G_EDIT_COPYPASTE); medit->addAction(cmd, Constants::G_EDIT_COPYPASTE);
//Paste Action // Paste Action
tmpaction = new QAction(QIcon(Constants::ICON_PASTE), tr("&Paste"), this); tmpaction = new QAction(QIcon(Constants::ICON_PASTE), tr("&Paste"), this);
cmd = am->registerAction(tmpaction, Constants::PASTE, m_globalContext); cmd = am->registerAction(tmpaction, Constants::PASTE, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::Paste); cmd->setDefaultKeySequence(QKeySequence::Paste);
medit->addAction(cmd, Constants::G_EDIT_COPYPASTE); medit->addAction(cmd, Constants::G_EDIT_COPYPASTE);
//Select All // Select All
tmpaction = new QAction(tr("&Select All"), this); tmpaction = new QAction(tr("&Select All"), this);
cmd = am->registerAction(tmpaction, Constants::SELECTALL, m_globalContext); cmd = am->registerAction(tmpaction, Constants::SELECTALL, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence::SelectAll); cmd->setDefaultKeySequence(QKeySequence::SelectAll);
medit->addAction(cmd, Constants::G_EDIT_SELECTALL); medit->addAction(cmd, Constants::G_EDIT_SELECTALL);
//Goto Action // Goto Action
tmpaction = new QAction(tr("&Go To Line..."), this); tmpaction = new QAction(tr("&Go To Line..."), this);
cmd = am->registerAction(tmpaction, Constants::GOTO, m_globalContext); cmd = am->registerAction(tmpaction, Constants::GOTO, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L")));
medit->addAction(cmd, Constants::G_EDIT_OTHER); medit->addAction(cmd, Constants::G_EDIT_OTHER);
//Options Action // Options Action
m_optionsAction = new QAction(tr("&Options..."), this); m_optionsAction = new QAction(tr("&Options..."), this);
cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, m_globalContext); cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, m_globalContext);
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
@@ -607,25 +607,25 @@ void MainWindow::registerDefaultActions()
connect(m_optionsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog())); connect(m_optionsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog()));
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
//Minimize Action // Minimize Action
m_minimizeAction = new QAction(tr("Minimize"), this); m_minimizeAction = new QAction(tr("Minimize"), this);
cmd = am->registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, m_globalContext); cmd = am->registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence("Ctrl+M")); cmd->setDefaultKeySequence(QKeySequence("Ctrl+M"));
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE); mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
connect(m_minimizeAction, SIGNAL(triggered()), this, SLOT(showMinimized())); connect(m_minimizeAction, SIGNAL(triggered()), this, SLOT(showMinimized()));
//Zoom Action // Zoom Action
m_zoomAction = new QAction(tr("Zoom"), this); m_zoomAction = new QAction(tr("Zoom"), this);
cmd = am->registerAction(m_zoomAction, Constants::ZOOM_WINDOW, m_globalContext); cmd = am->registerAction(m_zoomAction, Constants::ZOOM_WINDOW, m_globalContext);
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE); mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
connect(m_zoomAction, SIGNAL(triggered()), this, SLOT(showMaximized())); connect(m_zoomAction, SIGNAL(triggered()), this, SLOT(showMaximized()));
//Window separator // Window separator
cmd = createSeparator(am, this, QLatin1String("QtCreator.Window.Sep.Size"), m_globalContext); cmd = createSeparator(am, this, QLatin1String("QtCreator.Window.Sep.Size"), m_globalContext);
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE); mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
#endif #endif
// Toggle Sidebar Action // Show Sidebar Action
m_toggleSideBarAction = new QAction(QIcon(Constants::ICON_TOGGLE_SIDEBAR), m_toggleSideBarAction = new QAction(QIcon(Constants::ICON_TOGGLE_SIDEBAR),
tr("Show Sidebar"), this); tr("Show Sidebar"), this);
m_toggleSideBarAction->setCheckable(true); m_toggleSideBarAction->setCheckable(true);
@@ -641,19 +641,16 @@ void MainWindow::registerDefaultActions()
m_toggleSideBarAction->setEnabled(false); m_toggleSideBarAction->setEnabled(false);
#if !defined(Q_OS_MAC) #if !defined(Q_OS_MAC)
// Toggle Full Screen // Full Screen Action
m_toggleFullScreenAction = new QAction(tr("Toggle Fullscreen"), this); m_toggleFullScreenAction = new QAction(tr("Full Screen"), this);
m_toggleFullScreenAction->setCheckable(true); m_toggleFullScreenAction->setCheckable(true);
m_toggleFullScreenAction->setChecked(false); cmd = am->registerAction(m_toggleFullScreenAction, Constants::TOGGLE_FULLSCREEN, m_globalContext);
cmd = am->registerAction(m_toggleFullScreenAction,
Constants::TOGGLE_FULLSCREEN, m_globalContext);
cmd->setDefaultKeySequence(QKeySequence("Ctrl+Shift+F11")); cmd->setDefaultKeySequence(QKeySequence("Ctrl+Shift+F11"));
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE); mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
connect(m_toggleFullScreenAction, SIGNAL(triggered(bool)), connect(m_toggleFullScreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
this, SLOT(setFullScreen(bool)));
#endif #endif
//About IDE Action // About IDE Action
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
tmpaction = new QAction(tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu tmpaction = new QAction(tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu
#else #else
@@ -672,7 +669,7 @@ void MainWindow::registerDefaultActions()
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif #endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins())); connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
//About Qt Action // About Qt Action
// tmpaction = new QAction(tr("About &Qt..."), this); // tmpaction = new QAction(tr("About &Qt..."), this);
// cmd = am->registerAction(tmpaction, Constants:: ABOUT_QT, m_globalContext); // cmd = am->registerAction(tmpaction, Constants:: ABOUT_QT, m_globalContext);
// mhelp->addAction(cmd, Constants::G_HELP_ABOUT); // mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
@@ -937,10 +934,8 @@ void MainWindow::changeEvent(QEvent *e)
m_minimizeAction->setEnabled(!minimized); m_minimizeAction->setEnabled(!minimized);
m_zoomAction->setEnabled(!minimized); m_zoomAction->setEnabled(!minimized);
#else #else
QWindowStateChangeEvent *ev = bool isFullScreen = (windowState() & Qt::WindowFullScreen) != 0;
static_cast<QWindowStateChangeEvent *>(e); m_toggleFullScreenAction->setChecked(isFullScreen);
bool isFullScreen = (ev->oldState() & Qt::WindowFullScreen) != 0;
m_toggleFullScreenAction->setChecked(!isFullScreen);
#endif #endif
} }
} }

View File

@@ -50,7 +50,7 @@ namespace Internal {
FormClassWizardDialog::FormClassWizardDialog(const WizardPageList &extensionPages, FormClassWizardDialog::FormClassWizardDialog(const WizardPageList &extensionPages,
QWidget *parent) : QWidget *parent) :
QWizard(parent), QWizard(parent),
m_formPage(new FormTemplateWizardPagePage), m_formPage(new FormTemplateWizardPage),
m_classPage(new FormClassWizardPage) m_classPage(new FormClassWizardPage)
{ {
setWindowTitle(tr("Qt Designer Form Class")); setWindowTitle(tr("Qt Designer Form Class"));
@@ -97,8 +97,8 @@ void FormClassWizardDialog::slotCurrentIdChanged(int id)
m_rawFormTemplate = m_formPage->templateContents(); m_rawFormTemplate = m_formPage->templateContents();
// Strip namespaces from the ui class and suggest it as a new class // Strip namespaces from the ui class and suggest it as a new class
// name // name
if (FormTemplateWizardPagePage::getUIXmlData(m_rawFormTemplate, &formBaseClass, &uiClassName)) if (FormTemplateWizardPage::getUIXmlData(m_rawFormTemplate, &formBaseClass, &uiClassName))
m_classPage->setClassName(FormTemplateWizardPagePage::stripNamespaces(uiClassName)); m_classPage->setClassName(FormTemplateWizardPage::stripNamespaces(uiClassName));
} }
} }
@@ -107,7 +107,7 @@ FormClassWizardParameters FormClassWizardDialog::parameters() const
FormClassWizardParameters rc; FormClassWizardParameters rc;
m_classPage->getParameters(&rc); m_classPage->getParameters(&rc);
// Name the ui class in the Ui namespace after the class specified // Name the ui class in the Ui namespace after the class specified
rc.uiTemplate = FormTemplateWizardPagePage::changeUiClassName(m_rawFormTemplate, rc.className); rc.uiTemplate = FormTemplateWizardPage::changeUiClassName(m_rawFormTemplate, rc.className);
return rc; return rc;
} }

View File

@@ -45,7 +45,7 @@ namespace Internal {
struct FormClassWizardParameters; struct FormClassWizardParameters;
class FormClassWizardPage; class FormClassWizardPage;
class FormTemplateWizardPagePage; class FormTemplateWizardPage;
class FormClassWizardDialog : public QWizard class FormClassWizardDialog : public QWizard
{ {
@@ -73,7 +73,7 @@ private slots:
void slotCurrentIdChanged(int id); void slotCurrentIdChanged(int id);
private: private:
FormTemplateWizardPagePage *m_formPage; FormTemplateWizardPage *m_formPage;
FormClassWizardPage *m_classPage; FormClassWizardPage *m_classPage;
QString m_rawFormTemplate; QString m_rawFormTemplate;
}; };

View File

@@ -57,7 +57,7 @@ bool FormClassWizardParameters::generateCpp(QString *header, QString *source, in
const QString indent = QString(indentation, QLatin1Char(' ')); const QString indent = QString(indentation, QLatin1Char(' '));
QString formBaseClass; QString formBaseClass;
QString uiClassName; QString uiClassName;
if (!FormTemplateWizardPagePage::getUIXmlData(uiTemplate, &formBaseClass, &uiClassName)) { if (!FormTemplateWizardPage::getUIXmlData(uiTemplate, &formBaseClass, &uiClassName)) {
qWarning("Unable to determine the form base class from %s.", uiTemplate.toUtf8().constData()); qWarning("Unable to determine the form base class from %s.", uiTemplate.toUtf8().constData());
return false; return false;
} }
@@ -107,7 +107,7 @@ bool FormClassWizardParameters::generateCpp(QString *header, QString *source, in
if (embedding == PointerAggregatedUiClass) { if (embedding == PointerAggregatedUiClass) {
headerStr << '\n' headerStr << '\n'
<< namespaceIndent << "namespace " << uiNamespaceC << " {\n" << namespaceIndent << "namespace " << uiNamespaceC << " {\n"
<< namespaceIndent << indent << "class " << FormTemplateWizardPagePage::stripNamespaces(uiClassName) << ";\n" << namespaceIndent << indent << "class " << FormTemplateWizardPage::stripNamespaces(uiClassName) << ";\n"
<< namespaceIndent << "}\n"; << namespaceIndent << "}\n";
} }

View File

@@ -55,9 +55,9 @@
namespace Designer { namespace Designer {
namespace Internal { namespace Internal {
// ----------------- FormTemplateWizardPagePage // ----------------- FormTemplateWizardPage
FormTemplateWizardPagePage::FormTemplateWizardPagePage(QWidget * parent) : FormTemplateWizardPage::FormTemplateWizardPage(QWidget * parent) :
QWizardPage(parent), QWizardPage(parent),
m_newFormWidget(QDesignerNewFormWidgetInterface::createNewFormWidget(FormEditorW::instance()->designerEditor())), m_newFormWidget(QDesignerNewFormWidgetInterface::createNewFormWidget(FormEditorW::instance()->designerEditor())),
m_templateSelected(m_newFormWidget->hasCurrentTemplate()) m_templateSelected(m_newFormWidget->hasCurrentTemplate())
@@ -74,12 +74,12 @@ FormTemplateWizardPagePage::FormTemplateWizardPagePage(QWidget * parent) :
setLayout(layout); setLayout(layout);
} }
bool FormTemplateWizardPagePage::isComplete() const bool FormTemplateWizardPage::isComplete() const
{ {
return m_templateSelected; return m_templateSelected;
} }
void FormTemplateWizardPagePage::slotCurrentTemplateChanged(bool templateSelected) void FormTemplateWizardPage::slotCurrentTemplateChanged(bool templateSelected)
{ {
if (m_templateSelected == templateSelected) if (m_templateSelected == templateSelected)
return; return;
@@ -87,7 +87,7 @@ void FormTemplateWizardPagePage::slotCurrentTemplateChanged(bool templateSelecte
emit completeChanged(); emit completeChanged();
} }
bool FormTemplateWizardPagePage::validatePage() bool FormTemplateWizardPage::validatePage()
{ {
QString errorMessage; QString errorMessage;
m_templateContents = m_newFormWidget->currentTemplate(&errorMessage); m_templateContents = m_newFormWidget->currentTemplate(&errorMessage);
@@ -98,7 +98,7 @@ bool FormTemplateWizardPagePage::validatePage()
return true; return true;
} }
QString FormTemplateWizardPagePage::stripNamespaces(const QString &className) QString FormTemplateWizardPage::stripNamespaces(const QString &className)
{ {
QString rc = className; QString rc = className;
const int namespaceIndex = rc.lastIndexOf(QLatin1String("::")); const int namespaceIndex = rc.lastIndexOf(QLatin1String("::"));
@@ -107,7 +107,7 @@ QString FormTemplateWizardPagePage::stripNamespaces(const QString &className)
return rc; return rc;
} }
bool FormTemplateWizardPagePage::getUIXmlData(const QString &uiXml, bool FormTemplateWizardPage::getUIXmlData(const QString &uiXml,
QString *formBaseClass, QString *formBaseClass,
QString *uiClassName) QString *uiClassName)
{ {
@@ -179,7 +179,7 @@ static const char *classNameChangingSheetFormatC =
"</xsl:template>\n" "</xsl:template>\n"
"</xsl:stylesheet>\n"; "</xsl:stylesheet>\n";
QString FormTemplateWizardPagePage::changeUiClassName(const QString &uiXml, const QString &newUiClassName) QString FormTemplateWizardPage::changeUiClassName(const QString &uiXml, const QString &newUiClassName)
{ {
// Prepare I/O: Sheet // Prepare I/O: Sheet
const QString xsltSheet = QString::fromLatin1(classNameChangingSheetFormatC).arg(newUiClassName); const QString xsltSheet = QString::fromLatin1(classNameChangingSheetFormatC).arg(newUiClassName);
@@ -280,7 +280,7 @@ namespace {
// of the <class> element, as name of the first <widget> element, and possibly // of the <class> element, as name of the first <widget> element, and possibly
// in the signal/slot connections // in the signal/slot connections
QString FormTemplateWizardPagePage::changeUiClassName(const QString &uiXml, const QString &newUiClassName) QString FormTemplateWizardPage::changeUiClassName(const QString &uiXml, const QString &newUiClassName)
{ {
QDomDocument domUi; QDomDocument domUi;
if (!domUi.setContent(uiXml)) { if (!domUi.setContent(uiXml)) {

View File

@@ -46,12 +46,12 @@ namespace Internal {
// A wizard page embedding Qt Designer's QDesignerNewFormWidgetInterface // A wizard page embedding Qt Designer's QDesignerNewFormWidgetInterface
// widget. // widget.
class FormTemplateWizardPagePage : public QWizardPage class FormTemplateWizardPage : public QWizardPage
{ {
Q_DISABLE_COPY(FormTemplateWizardPagePage) Q_DISABLE_COPY(FormTemplateWizardPage)
Q_OBJECT Q_OBJECT
public: public:
explicit FormTemplateWizardPagePage(QWidget * parent = 0); explicit FormTemplateWizardPage(QWidget * parent = 0);
virtual bool isComplete () const; virtual bool isComplete () const;
virtual bool validatePage(); virtual bool validatePage();

View File

@@ -53,7 +53,7 @@ namespace Internal {
FormWizardDialog::FormWizardDialog(const WizardPageList &extensionPages, FormWizardDialog::FormWizardDialog(const WizardPageList &extensionPages,
QWidget *parent) QWidget *parent)
: QWizard(parent), : QWizard(parent),
m_formPage(new FormTemplateWizardPagePage) m_formPage(new FormTemplateWizardPage)
{ {
init(extensionPages); init(extensionPages);
} }
@@ -114,8 +114,8 @@ void FormFileWizardDialog::slotCurrentIdChanged(int id)
// the ui class // the ui class
QString formBaseClass; QString formBaseClass;
QString uiClassName; QString uiClassName;
if (FormTemplateWizardPagePage::getUIXmlData(templateContents(), &formBaseClass, &uiClassName)) { if (FormTemplateWizardPage::getUIXmlData(templateContents(), &formBaseClass, &uiClassName)) {
QString fileName = FormTemplateWizardPagePage::stripNamespaces(uiClassName).toLower(); QString fileName = FormTemplateWizardPage::stripNamespaces(uiClassName).toLower();
fileName += QLatin1String(".ui"); fileName += QLatin1String(".ui");
m_filePage->setName(fileName); m_filePage->setName(fileName);
} }

View File

@@ -45,7 +45,7 @@ namespace Utils {
namespace Designer { namespace Designer {
namespace Internal { namespace Internal {
class FormTemplateWizardPagePage; class FormTemplateWizardPage;
// Single-Page Wizard for new forms offering all types known to Qt Designer. // Single-Page Wizard for new forms offering all types known to Qt Designer.
// To be used for Mode "CreateNewEditor" [not currently used] // To be used for Mode "CreateNewEditor" [not currently used]
@@ -65,7 +65,7 @@ public:
private: private:
void init(const WizardPageList &extensionPages); void init(const WizardPageList &extensionPages);
FormTemplateWizardPagePage *m_formPage; FormTemplateWizardPage *m_formPage;
mutable QString m_templateContents; mutable QString m_templateContents;
}; };

View File

@@ -105,7 +105,7 @@ enum SubMode
ChangeSubMode, ChangeSubMode,
DeleteSubMode, DeleteSubMode,
FilterSubMode, FilterSubMode,
ReplaceSubMode, ReplaceSubMode, // used for R and r
YankSubMode, YankSubMode,
IndentSubMode, IndentSubMode,
ZSubMode, ZSubMode,
@@ -113,11 +113,13 @@ enum SubMode
enum SubSubMode enum SubSubMode
{ {
// typically used for things that require one more data item
// and are 'nested' behind a mode
NoSubSubMode, NoSubSubMode,
FtSubSubMode, // used for f, F, t, T FtSubSubMode, // used for f, F, t, T
MarkSubSubMode, // used for m MarkSubSubMode, // used for m
BackTickSubSubMode, // used for ` BackTickSubSubMode, // used for `
TickSubSubMode // used for ' TickSubSubMode, // used for '
}; };
enum VisualMode enum VisualMode
@@ -188,7 +190,7 @@ private:
int count() const { return mvCount() * opCount(); } int count() const { return mvCount() * opCount(); }
int leftDist() const { return m_tc.position() - m_tc.block().position(); } int leftDist() const { return m_tc.position() - m_tc.block().position(); }
int rightDist() const { return m_tc.block().length() - leftDist() - 1; } int rightDist() const { return m_tc.block().length() - leftDist() - 1; }
bool atEol() const { return m_tc.atBlockEnd() && m_tc.block().length()>1; } bool atEndOfLine() const { return m_tc.atBlockEnd() && m_tc.block().length()>1; }
int lastPositionInDocument() const; int lastPositionInDocument() const;
int positionForLine(int line) const; // 1 based line, 0 based pos int positionForLine(int line) const; // 1 based line, 0 based pos
@@ -284,11 +286,11 @@ public:
void recordInsert(int position, const QString &data); void recordInsert(int position, const QString &data);
void recordRemove(int position, const QString &data); void recordRemove(int position, const QString &data);
void recordRemove(int position, int length); void recordRemove(int position, int length);
void recordMove(int position, int nestedCount);
void recordRemoveNextChar(); void recordRemoveNextChar();
void recordInsertText(const QString &data); void recordInsertText(const QString &data);
QString recordRemoveSelectedText(); QString recordRemoveSelectedText();
void recordMove();
void recordBeginGroup(); void recordBeginGroup();
void recordEndGroup(); void recordEndGroup();
int anchor() const { return m_anchor; } int anchor() const { return m_anchor; }
@@ -301,7 +303,6 @@ public:
QStack<int> m_undoGroupStack; QStack<int> m_undoGroupStack;
// extra data for '.' // extra data for '.'
QString m_dotCount;
QString m_dotCommand; QString m_dotCommand;
// history for '/' // history for '/'
@@ -392,7 +393,7 @@ bool FakeVimHandler::Private::handleEvent(QKeyEvent *ev)
bool handled = handleKey(key, um, ev->text()); bool handled = handleKey(key, um, ev->text());
// We fake vi-style end-of-line behaviour // We fake vi-style end-of-line behaviour
m_fakeEnd = (atEol() && m_mode == CommandMode); m_fakeEnd = (atEndOfLine() && m_mode == CommandMode);
if (m_fakeEnd) if (m_fakeEnd)
moveLeft(); moveLeft();
@@ -447,7 +448,7 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand)
m_registers[m_register] = recordRemoveSelectedText(); m_registers[m_register] = recordRemoveSelectedText();
recordEndGroup(); recordEndGroup();
m_submode = NoSubMode; m_submode = NoSubMode;
if (atEol()) if (atEndOfLine())
moveLeft(); moveLeft();
} else if (m_submode == YankSubMode) { } else if (m_submode == YankSubMode) {
m_registers[m_register] = selectedText(); m_registers[m_register] = selectedText();
@@ -468,6 +469,7 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand)
m_submode = NoSubMode; m_submode = NoSubMode;
} else if (m_moveType == MoveExclusive) { } else if (m_moveType == MoveExclusive) {
moveLeft(); // correct moveLeft(); // correct
m_moveType = MoveInclusive;
} }
m_mvcount.clear(); m_mvcount.clear();
m_opcount.clear(); m_opcount.clear();
@@ -632,12 +634,6 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
moveDown(count()); moveDown(count());
m_moveType = MoveLineWise; m_moveType = MoveLineWise;
finishMovement("y"); finishMovement("y");
} else if (m_submode == ReplaceSubMode) {
if (atEol())
moveLeft(KeepAnchor);
else
m_tc.deleteChar();
recordInsertText(text);
} else if (m_submode == IndentSubMode && key == '=') { } else if (m_submode == IndentSubMode && key == '=') {
indentRegion(m_tc.block(), m_tc.block().next()); indentRegion(m_tc.block(), m_tc.block().next());
finishMovement(); finishMovement();
@@ -655,6 +651,22 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
handleFfTt(key); handleFfTt(key);
m_subsubmode = NoSubSubMode; m_subsubmode = NoSubSubMode;
finishMovement(QString(QChar(m_subsubdata)) + QChar(key)); finishMovement(QString(QChar(m_subsubdata)) + QChar(key));
} else if (m_submode == ReplaceSubMode) {
if (count() < rightDist() && text.size() == 1
&& (text.at(0).isPrint() || text.at(0).isSpace())) {
recordBeginGroup();
setAnchor();
moveRight(count());
recordRemoveSelectedText();
recordInsertText(QString(count(), text.at(0)));
recordEndGroup();
m_moveType = MoveExclusive;
m_submode = NoSubMode;
m_dotCommand = QString("%1r%2").arg(count()).arg(text);
finishMovement();
} else {
m_submode = NoSubMode;
}
} else if (m_subsubmode == MarkSubSubMode) { } else if (m_subsubmode == MarkSubSubMode) {
m_marks[key] = m_tc.position(); m_marks[key] = m_tc.position();
m_subsubmode = NoSubSubMode; m_subsubmode = NoSubSubMode;
@@ -749,6 +761,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
m_mode = InsertMode; m_mode = InsertMode;
recordBeginGroup(); recordBeginGroup();
m_lastInsertion.clear(); m_lastInsertion.clear();
if (!atEndOfLine())
moveRight(); moveRight();
updateMiniBuffer(); updateMiniBuffer();
} else if (key == 'A') { } else if (key == 'A') {
@@ -774,7 +787,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
m_mode = InsertMode; m_mode = InsertMode;
finishMovement(); finishMovement();
} else if (key == 'd' && m_visualMode == NoVisualMode) { } else if (key == 'd' && m_visualMode == NoVisualMode) {
if (atEol()) if (atEndOfLine())
moveLeft(); moveLeft();
setAnchor(); setAnchor();
recordBeginGroup(); recordBeginGroup();
@@ -828,7 +841,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
} else if (key == 'i') { } else if (key == 'i') {
enterInsertMode(); enterInsertMode();
updateMiniBuffer(); updateMiniBuffer();
if (atEol()) if (atEndOfLine())
moveLeft(); moveLeft();
} else if (key == 'I') { } else if (key == 'I') {
setAnchor(); setAnchor();
@@ -916,25 +929,35 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
//qDebug() << "REGISTERS: " << m_registers << "MOVE: " << m_moveType; //qDebug() << "REGISTERS: " << m_registers << "MOVE: " << m_moveType;
//qDebug() << "LINES: " << n << text << m_register; //qDebug() << "LINES: " << n << text << m_register;
if (n > 0) { if (n > 0) {
recordMove();
moveToStartOfLine(); moveToStartOfLine();
m_desiredColumn = 0;
for (int i = count(); --i >= 0; ) {
if (key == 'p') if (key == 'p')
moveDown(); moveDown();
recordInsertText(text); recordInsertText(text);
moveUp(n); moveUp(n);
}
} else { } else {
m_desiredColumn = 0;
for (int i = count(); --i >= 0; ) {
if (key == 'p') if (key == 'p')
moveRight(); moveRight();
recordInsertText(text); recordInsertText(text);
moveLeft(); moveLeft();
} }
}
recordEndGroup(); recordEndGroup();
m_dotCommand = "p"; m_dotCommand = QString("%1p").arg(count());
finishMovement();
} else if (key == 'r') { } else if (key == 'r') {
recordBeginGroup();
m_submode = ReplaceSubMode; m_submode = ReplaceSubMode;
m_dotCommand = "r"; m_dotCommand = "r";
} else if (key == 'R') { } else if (key == 'R') {
// FIXME: right now we repeat the insertion count() times,
// but not the deletion
recordBeginGroup(); recordBeginGroup();
m_lastInsertion.clear();
m_mode = InsertMode; m_mode = InsertMode;
m_submode = ReplaceSubMode; m_submode = ReplaceSubMode;
m_dotCommand = "R"; m_dotCommand = "R";
@@ -972,9 +995,10 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
moveToNextWord(true); moveToNextWord(true);
finishMovement("W"); finishMovement("W");
} else if (key == 'x') { // = "dl" } else if (key == 'x') { // = "dl"
if (atEol()) if (atEndOfLine())
moveLeft(); moveLeft();
recordBeginGroup(); recordBeginGroup();
setAnchor();
m_submode = DeleteSubMode; m_submode = DeleteSubMode;
moveRight(qMin(count(), rightDist())); moveRight(qMin(count(), rightDist()));
finishMovement("l"); finishMovement("l");
@@ -987,7 +1011,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
finishMovement(); finishMovement();
} else if (key == 'y') { } else if (key == 'y') {
m_savedYankPosition = m_tc.position(); m_savedYankPosition = m_tc.position();
if (atEol()) if (atEndOfLine())
moveLeft(); moveLeft();
recordBeginGroup(); recordBeginGroup();
setAnchor(); setAnchor();
@@ -1001,7 +1025,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
} else if (key == 'z') { } else if (key == 'z') {
recordBeginGroup(); recordBeginGroup();
m_submode = ZSubMode; m_submode = ZSubMode;
} else if (key == '~' && !atEol()) { } else if (key == '~' && !atEndOfLine()) {
recordBeginGroup(); recordBeginGroup();
setAnchor(); setAnchor();
moveRight(qMin(count(), rightDist())); moveRight(qMin(count(), rightDist()));
@@ -1019,7 +1043,9 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
moveUp(count() * (linesOnScreen() - 2)); moveUp(count() * (linesOnScreen() - 2));
finishMovement(); finishMovement();
} else if (key == Key_Delete) { } else if (key == Key_Delete) {
m_tc.deleteChar(); setAnchor();
moveRight(qMin(1, rightDist()));
recordRemoveSelectedText();
} else if (key == Key_Escape) { } else if (key == Key_Escape) {
if (m_visualMode != NoVisualMode) if (m_visualMode != NoVisualMode)
leaveVisualMode(); leaveVisualMode();
@@ -1085,7 +1111,7 @@ bool FakeVimHandler::Private::handleInsertMode(int key, int, const QString &text
} else if (!text.isEmpty()) { } else if (!text.isEmpty()) {
m_lastInsertion.append(text); m_lastInsertion.append(text);
if (m_submode == ReplaceSubMode) { if (m_submode == ReplaceSubMode) {
if (atEol()) if (atEndOfLine())
m_submode = NoSubMode; m_submode = NoSubMode;
else else
m_tc.deleteChar(); m_tc.deleteChar();
@@ -1620,7 +1646,7 @@ void FakeVimHandler::Private::moveToMatchingParanthesis()
#if 0 #if 0
// FIXME: remove TextEditor dependency // FIXME: remove TextEditor dependency
bool undoFakeEOL = false; bool undoFakeEOL = false;
if (atEol()) { if (atEndOfLine()) {
m_tc.movePosition(Left, KeepAnchor, 1); m_tc.movePosition(Left, KeepAnchor, 1);
undoFakeEOL = true; undoFakeEOL = true;
} }
@@ -1851,8 +1877,19 @@ void FakeVimHandler::Private::recordInsertText(const QString &data)
m_tc.insertText(data); m_tc.insertText(data);
} }
void FakeVimHandler::Private::recordMove()
{
EditOperation op;
op.position = m_tc.position();
m_undoStack.push(op);
m_redoStack.clear();
//qDebug() << "MOVE: " << op;
//qDebug() << "\nSTACK: " << m_undoStack;
}
void FakeVimHandler::Private::recordOperation(const EditOperation &op) void FakeVimHandler::Private::recordOperation(const EditOperation &op)
{ {
//qDebug() << "OP: " << op;
// No need to record operations that actually do not change anything. // No need to record operations that actually do not change anything.
if (op.from.isEmpty() && op.to.isEmpty() && op.itemCount == 0) if (op.from.isEmpty() && op.to.isEmpty() && op.itemCount == 0)
return; return;
@@ -1861,14 +1898,7 @@ void FakeVimHandler::Private::recordOperation(const EditOperation &op)
return; return;
m_undoStack.push(op); m_undoStack.push(op);
m_redoStack.clear(); m_redoStack.clear();
} //qDebug() << "\nSTACK: " << m_undoStack;
void FakeVimHandler::Private::recordMove(int position, int nestedCount)
{
EditOperation op;
op.position = position;
op.itemCount = nestedCount;
recordOperation(op);
} }
void FakeVimHandler::Private::recordInsert(int position, const QString &data) void FakeVimHandler::Private::recordInsert(int position, const QString &data)

View File

@@ -446,7 +446,7 @@ void HelpPlugin::extensionsInitialized()
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
+ QLatin1String("/../Resources/doc/qtcreator.qch")); + QLatin1String("/../Resources/doc/qtcreator.qch"));
#else #else
+ QLatin1String("/../doc/qtcreator.qch")); + QLatin1String("../../share/doc/qtcreator/qtcreator.qch"));
#endif #endif
QHelpEngineCore hc(fi.absoluteFilePath()); QHelpEngineCore hc(fi.absoluteFilePath());
hc.setupData(); hc.setupData();

View File

@@ -17,10 +17,12 @@ isEmpty(IDE_BUILD_TREE) {
macx { macx {
IDE_APP_TARGET = QtCreator IDE_APP_TARGET = QtCreator
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/PlugIns IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/PlugIns
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH
contains(QT_CONFIG, ppc):CONFIG += ppc x86 contains(QT_CONFIG, ppc):CONFIG += ppc x86
} else { } else {
IDE_APP_TARGET = qtcreator IDE_APP_TARGET = qtcreator
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/lib IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/lib/qtcreator
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins/
} }
IDE_APP_PATH = $$IDE_BUILD_TREE/bin IDE_APP_PATH = $$IDE_BUILD_TREE/bin
win32 { win32 {

View File

@@ -7,16 +7,13 @@ win32 {
DESTDIR = $$IDE_LIBRARY_PATH DESTDIR = $$IDE_LIBRARY_PATH
macx { include(../rpath.pri)
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/
} else:linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
QMAKE_RPATHDIR += \$\$ORIGIN
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
QMAKE_RPATHDIR =
}
TARGET = $$qtLibraryTarget($$TARGET) TARGET = $$qtLibraryTarget($$TARGET)
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
linux-* {
target.path = /lib/qtcreator
INSTALLS += target
}

View File

@@ -7,7 +7,7 @@ isEmpty(PROVIDER) {
PROVIDER = Nokia PROVIDER = Nokia
} }
DESTDIR = $$IDE_LIBRARY_PATH/$$PROVIDER/ DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER/
LIBS += -L$$DESTDIR LIBS += -L$$DESTDIR
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins
DEPENDPATH += $$IDE_SOURCE_TREE/src/plugins DEPENDPATH += $$IDE_SOURCE_TREE/src/plugins
@@ -40,7 +40,9 @@ macx {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/$${PROVIDER}/ QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/$${PROVIDER}/
} else:linux-* { } else:linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
QMAKE_RPATHDIR += \$\$ORIGIN
QMAKE_RPATHDIR += \$\$ORIGIN/.. QMAKE_RPATHDIR += \$\$ORIGIN/..
QMAKE_RPATHDIR += \$\$ORIGIN/../..
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":") IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\' QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
QMAKE_RPATHDIR = QMAKE_RPATHDIR =
@@ -48,3 +50,12 @@ macx {
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
CONFIG += plugin
linux-* {
target.path = /lib/qtcreator/plugins/$$PROVIDER
pluginspec.files += $${TARGET}.pluginspec
pluginspec.path = /lib/qtcreator/plugins/$$PROVIDER
INSTALLS += target pluginspec
}

13
src/rpath.pri Normal file
View File

@@ -0,0 +1,13 @@
macx {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/
} else:linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
# this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var
QMAKE_RPATHDIR += \$\$ORIGIN/../lib/qtcreator
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
QMAKE_RPATHDIR =
}

View File

@@ -0,0 +1,210 @@
/***************************************************************************
**
** 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.
**
***************************************************************************/
#include <cstdio>
#include <cstring>
#include <locale>
#include "binpatch.h"
// returns positive value if it finds a null termination inside the buffer
long BinPatch::getBufferStringLength(char *data, char *end)
{
long size = 0;
while (data < end) {
if (*data == '\0')
return size;
++data;
++size;
}
return -1;
}
// returns true if data ends with one of the tokens. (Sep. with ;)
bool BinPatch::endsWithTokens(const char *data)
{
if(strlen(endTokens) > 0) {
char endstmp[1024];
ulong tlen = ulong(strlen(data));
if(strlen(endTokens) >= sizeof(endstmp))
return false;
strcpy(endstmp, endTokens);
char *token = strtok(endstmp, ";");
while(token != NULL) {
// check if it ends with the token
if ((tlen >= strlen(token))
&& (strcasecmp((data+tlen)-strlen(token), token) == 0))
return true;
token = strtok(NULL, ";");
}
} else {
return true; //true if no tokens
}
return false; //no matching tokens
}
bool BinPatch::patchHelper(char *inbuffer, const char *oldstr, const char *newstr, size_t len, long *rw)
{
char nc1 = *oldstr;
char nc2 = 0;
char *inend = inbuffer + len;
size_t oldlen = strlen(oldstr);
size_t newlen = strlen(newstr);
char *instart = inbuffer;
*rw = 0;
bool write = true;
isupper(nc1) ? nc2 = tolower(nc1) : nc2 = toupper(nc1);
while(inbuffer < inend) {
if ((*inbuffer == nc1) || (*inbuffer == nc2)) {
if (inbuffer > (inend-oldlen) || inbuffer > (inend-newlen)) {
*rw = (long)(inend-inbuffer); //rewind, not enough to make a compare
break;
}
if (strncasecmp(inbuffer, oldstr, oldlen) == 0) {
if (useLength && (instart == inbuffer)) {
*rw = (long)(len+1); //we don't have access to the length byte, rewind all + 1!
write = false;
break;
}
long oldsize = -1;
if (useLength) { //VC60
oldsize = (unsigned char)(*(inbuffer-1));
// vc60 pdb files sometimes uses 0A, then it should be null terminated
if (oldsize < (long)oldlen) {
if (oldsize != 0x0A) { //strange case... skip
inbuffer+=oldlen;
continue;
}
oldsize = getBufferStringLength(inbuffer, inend);
if (oldsize < 0) {
*rw = (long)(inend-inbuffer); //rewind, entire string not in buffer
break;
}
}
if (inbuffer > (inend-oldsize)) {
*rw = (long)(inend-inbuffer); //rewind, entire string not in buffer
break;
}
} else { //VC7x
oldsize = getBufferStringLength(inbuffer, inend);
if (oldsize < 0) {
*rw = (long)(inend-inbuffer); //rewind, entire string not in buffer
break;
}
}
char oldPath[1024];
if (oldsize > (long)sizeof(oldPath)) {
//at least don't crash
inbuffer+=oldsize;
continue;
}
memset(oldPath, '\0', sizeof(oldPath));
strncpy(oldPath, newstr, newlen);
if (insertReplace)
strncat(oldPath, inbuffer+oldlen, oldsize-oldlen);
// just replace if it ends with a token in endTokens
if (endsWithTokens(oldPath)) {
if (oldsize < (long)strlen(oldPath))
oldsize = (long)strlen(oldPath);
memcpy(inbuffer, oldPath, oldsize);
}
inbuffer+=oldsize;
continue;
}
}
++inbuffer;
}
return write;
}
bool BinPatch::patch(const char *oldstr, const char *newstr)
{
size_t oldlen = strlen(oldstr);
size_t newlen = strlen(newstr);
if ((!fileName || strlen(fileName) < 1)
|| (!oldstr || oldlen < 1)
|| (!newstr || newlen < 1))
return false;
FILE *input;
if (!(input = fopen(fileName, "r+b")))
{
fprintf(stderr, "Cannot open file %s!\n", fileName);
return false;
}
char data[60000];
long rw = 0;
long offset = 0;
size_t len;
len = fread(data, sizeof(char), sizeof(data), input);
do {
if (patchHelper(data, oldstr, newstr, len, &rw)) {
fseek(input, offset, SEEK_SET); //overwrite
fwrite(data, sizeof(char), len, input);
}
offset += (long)((-rw) + len);
if (fseek(input, offset, SEEK_SET) != 0)
break;
len = fread(data, sizeof(char), sizeof(data), input);
} while(!(feof(input) && (len <= oldlen || len <= newlen)));
fclose(input);
return true;
}

View File

@@ -0,0 +1,74 @@
/***************************************************************************
**
** 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.
**
***************************************************************************/
#ifndef BINPATCH_H
#define BINPATCH_H
#include <string.h>
typedef unsigned long ulong;
typedef unsigned int uint;
class BinPatch
{
public:
BinPatch(const char *file)
: useLength(false), insertReplace(false)
{
strcpy(endTokens, "");
strcpy(fileName, file);
}
void enableUseLength(bool enabled)
{ useLength = enabled; }
void enableInsertReplace(bool enabled)
{ insertReplace = enabled; }
void setEndTokens(const char *tokens)
{ strcpy(endTokens, tokens); }
bool patch(const char *oldstr, const char *newstr);
private:
long getBufferStringLength(char *data, char *end);
bool endsWithTokens(const char *data);
bool patchHelper(char *inbuffer, const char *oldstr,
const char *newstr, size_t len, long *rw);
bool useLength;
bool insertReplace;
char endTokens[1024];
char fileName[1024];
};
#endif

View File

@@ -0,0 +1,15 @@
######################################################################
# Automatically generated by qmake (2.01a) Di 8. Jul 15:08:13 2008
######################################################################
CONFIG += console
QT -= gui
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
DESTDIR = ./
# Input
HEADERS += binpatch.h
SOURCES += binpatch.cpp qtlibspatchermain.cpp

View File

@@ -0,0 +1,781 @@
/***************************************************************************
**
** 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.
**
***************************************************************************/
#include "binpatch.h"
#include <cstdio>
#include <iostream>
#include <QFile>
#include <QRegExp>
#include <QTextStream>
#include <QString>
#include <QtCore/QDebug>
#ifdef Q_OS_WIN
const char * const oldInstallBase = "C:/qt-greenhouse/Trolltech/Code_less_create_more/"
"Trolltech/Code_less_create_more/Troll/4.4.3";
#else
const char * const oldSourceBase = "/home/berlin/dev/qt-4.4.3-temp/qt-x11-opensource-src-4.4.3";
const char * const oldInstallBase = "/home/berlin/dev/qt-4.4.3-shipping";
#endif
char * allocFileNameCopyAppend(const char * textToCopy,
const char * textToAppend, const char * textToAppend2 = NULL);
void logFileName(const char *fileName) {
std::cout << "Patching file " << fileName << std::endl;
}
void logDiff(const char *oldText, const char *newText) {
std::cout << " --- " << oldText << std::endl;
std::cout << " +++ " << newText << std::endl;
}
bool patchBinaryWithQtPathes(const char *fileName, const char *baseQtPath)
{
bool result = true;
static const struct
{
const char *variable;
const char *subDirectory;
} variables[] = {
{"qt_prfxpath=", ""},
{"qt_docspath=", "/doc"},
{"qt_hdrspath=", "/include"},
{"qt_libspath=", "/lib"},
{"qt_binspath=", "/bin"},
{"qt_plugpath=", "/plugins"},
{"qt_datapath=", ""},
{"qt_trnspath=", "/translations"},
{"qt_xmplpath=", "/examples"},
{"qt_demopath=", "/demos"}
};
logFileName(fileName);
for (int i = 0; i < (int)(sizeof(variables) / sizeof(variables[0])); i++) {
const char * const newStr = allocFileNameCopyAppend(variables[i].variable, baseQtPath, variables[i].subDirectory);
BinPatch binFile(fileName);
const bool success = binFile.patch(variables[i].variable, newStr);
delete[] newStr;
if (!success) {
result = false;
break;
}
}
return result;
}
bool patchBinariesWithQtPathes(const char *baseQtPath)
{
bool result = true;
static const char *filesToPatch[] = {
#ifdef Q_OS_WIN
"/bin/qmake.exe",
"/bin/QtCore4.dll",
"/bin/QtCored4.dll"
#else
"/bin/qmake",
"/lib/libQtCore.so",
#endif
};
for (int i = 0; i < (int)(sizeof(filesToPatch) / sizeof(filesToPatch[0])); i++) {
const char * const fileName = allocFileNameCopyAppend(baseQtPath, filesToPatch[i]);
const bool success = patchBinaryWithQtPathes(fileName, baseQtPath);
delete[] fileName;
if (!success) {
result = false;
break;
}
}
return result;
}
char * allocFileNameCopyAppend(const char * textToCopy,
const char * textToAppend, const char * textToAppend2)
{
const unsigned int bytesToAllocate = FILENAME_MAX;
Q_ASSERT(bytesToAllocate > 0);
Q_ASSERT(textToCopy != NULL);
Q_ASSERT(textToAppend != NULL);
if (textToAppend2 == NULL)
textToAppend2 = "";
Q_ASSERT(textToAppend2 != NULL);
char * const res = new char[bytesToAllocate];
const size_t textToCopyLen = strlen(textToCopy);
const size_t textToAppendLen = strlen(textToAppend);
const size_t textToAppend2Len = strlen(textToAppend2);
// Array too small?
if (textToCopyLen + textToAppendLen + textToAppend2Len >= bytesToAllocate) {
res[0] = '\0';
return res;
}
strncpy(res, textToCopy, bytesToAllocate - 1);
if (textToAppendLen > 0)
strncpy(res + textToCopyLen, textToAppend, bytesToAllocate - textToCopyLen - 1);
if (textToAppend2Len > 0)
strncpy(res + textToCopyLen + textToAppend2Len, textToAppend2, bytesToAllocate - textToCopyLen - textToAppend2Len - 1);
res[textToCopyLen + textToAppendLen + textToAppend2Len] = '\0';
res[bytesToAllocate - 1] = '\0'; // Safe is safe
return res;
}
bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
{
bool result = true;
static const struct
{
const char *fileName;
const char *sourceLocation;
} libraries[] = {
#ifdef Q_OS_WIN
{"/bin/Qt3Supportd4.dll", "/src/qt3support/"},
{"/bin/QtCored4.dll", "/src/corelib/"},
{"/bin/QtGuid4.dll", "/src/gui/"},
{"/bin/QtHelpd4.dll", "/tools/assistant/lib/"},
{"/bin/QtNetworkd4.dll", "/src/network/"},
{"/bin/QtOpenGLd4.dll", "/src/opengl/"},
{"/bin/QtScriptd4.dll", "/src/script/"},
{"/bin/QtSqld4.dll", "/src/sql/"},
{"/bin/QtSvgd4.dll", "/src/svg/"},
{"/bin/QtTestd4.dll", "/src/testlib/"},
{"/bin/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"},
{"/bin/QtXmld4.dll", "/src/xml/"},
{"/bin/QtXmlPatternsd4.dll", "/src/xmlpatterns/"},
{"/plugins/accessible/qtaccessiblecompatwidgetsd4.dll", "/src/plugins/accessible/compat/"},
{"/plugins/accessible/qtaccessiblewidgetsd4.dll", "/src/plugins/accessible/widgets/"},
{"/plugins/codecs/qcncodecsd4.dll", "/src/plugins/codecs/cn/"},
{"/plugins/codecs/qjpcodecsd4.dll", "/src/plugins/codecs/jp/"},
{"/plugins/codecs/qkrcodecsd4.dll", "/src/plugins/codecs/kr/"},
{"/plugins/codecs/qtwcodecsd4.dll", "/src/plugins/codecs/tw/"},
{"/plugins/iconengines/qsvgicond4.dll", "/src/plugins/iconengines/svgiconengine/"},
{"/plugins/imageformats/qgifd4.dll", "/src/plugins/imageformats/gif/"},
{"/plugins/imageformats/qjpegd4.dll", "/src/plugins/imageformats/jpeg/"},
{"/plugins/imageformats/qmngd4.dll", "/src/plugins/imageformats/mng/"},
{"/plugins/imageformats/qsvgd4.dll", "/src/plugins/imageformats/svg/"},
{"/plugins/imageformats/qtiffd4.dll", "/src/plugins/imageformats/tiff/"},
{"/plugins/sqldrivers/qsqlited4.dll", "/src/plugins/sqldrivers/sqlite/"},
// {"/plugins/sqldrivers/qsqlodbcd4.dll", "/src/plugins/sqldrivers/odbc/"}
#else
{"/examples/tools/plugandpaint/plugins/libpnp_basictools.a", "/examples/tools/plugandpaintplugins/basictools"},
{"/lib/libQtUiTools.a", "/tools/designer/src/uitools"},
{"/demos/shared/libdemo_shared.a", "/demos/shared"},
{"/plugins/codecs/libqkrcodecs.so.debug", "/plugins/codecs"},
{"/plugins/codecs/libqtwcodecs.so.debug", "/plugins/codecs"},
{"/plugins/codecs/libqcncodecs.so.debug", "/plugins/codecs"},
{"/plugins/codecs/libqjpcodecs.so.debug", "/plugins/codecs"},
{"/plugins/iconengines/libqsvgicon.so.debug", "/plugins/iconengines"},
{"/plugins/sqldrivers/libqsqlmysql.so.debug", "/plugins/sqldrivers"},
{"/plugins/sqldrivers/libqsqlite.so.debug", "/plugins/sqldrivers"},
{"/plugins/sqldrivers/libqsqlite2.so.debug", "/plugins/sqldrivers"},
{"/plugins/sqldrivers/libqsqlpsql.so.debug", "/plugins/sqldrivers"},
{"/plugins/imageformats/libqgif.so.debug", "/plugins/imageformats"},
{"/plugins/imageformats/libqtiff.so.debug", "/plugins/imageformats"},
{"/plugins/imageformats/libqsvg.so.debug", "/plugins/imageformats"},
{"/plugins/imageformats/libqjpeg.so.debug", "/plugins/imageformats"},
{"/plugins/imageformats/libqico.so.debug", "/plugins/imageformats"},
{"/plugins/imageformats/libqmng.so.debug", "/plugins/imageformats"},
{"/plugins/accessible/libqtaccessiblewidgets.so.debug", "/plugins/accessible"},
{"/plugins/accessible/libqtaccessiblecompatwidgets.so.debug", "/plugins/accessible"},
{"/plugins/designer/libcontainerextension.so.debug", "/plugins/designer"},
{"/plugins/designer/libtaskmenuextension.so.debug", "/plugins/designer"},
{"/plugins/designer/libqwebview.so.debug", "/plugins/designer"},
{"/plugins/designer/libcustomwidgetplugin.so.debug", "/plugins/designer"},
{"/plugins/designer/libarthurplugin.so.debug", "/plugins/designer"},
{"/plugins/designer/libqt3supportwidgets.so.debug", "/plugins/designer"},
{"/plugins/designer/libworldtimeclockplugin.so.debug", "/plugins/designer"},
{"/plugins/inputmethods/libqimsw-multi.so.debug", "/plugins/inputmethods"},
{"/plugins/script/libqtscriptdbus.so.debug", "/plugins/script"},
{"/examples/draganddrop/puzzle/puzzle.debug", "/examples/draganddrop/puzzle"},
{"/examples/draganddrop/dropsite/dropsite.debug", "/examples/draganddrop/dropsite"},
{"/examples/draganddrop/draggabletext/draggabletext.debug", "/examples/draganddrop/draggabletext"},
{"/examples/draganddrop/draggableicons/draggableicons.debug", "/examples/draganddrop/draggableicons"},
{"/examples/draganddrop/fridgemagnets/fridgemagnets.debug", "/examples/draganddrop/fridgemagnets"},
{"/examples/webkit/formextractor/formExtractor.debug", "/examples/webkit/formextractor"},
{"/examples/webkit/previewer/previewer.debug", "/examples/webkit/previewer"},
{"/examples/richtext/orderform/orderform.debug", "/examples/richtext/orderform"},
{"/examples/richtext/calendar/calendar.debug", "/examples/richtext/calendar"},
{"/examples/richtext/syntaxhighlighter/syntaxhighlighter.debug", "/examples/richtext/syntaxhighlighter"},
{"/examples/desktop/systray/systray.debug", "/examples/desktop/systray"},
{"/examples/desktop/screenshot/screenshot.debug", "/examples/desktop/screenshot"},
{"/examples/linguist/arrowpad/arrowpad.debug", "/examples/linguist/arrowpad"},
{"/examples/linguist/trollprint/trollprint.debug", "/examples/linguist/trollprint"},
{"/examples/linguist/hellotr/hellotr.debug", "/examples/linguist/hellotr"},
{"/examples/ipc/sharedmemory/sharedmemory.debug", "/examples/ipc/sharedmemory"},
{"/examples/ipc/localfortuneclient/localfortuneclient.debug", "/examples/ipc/localfortuneclient"},
{"/examples/ipc/localfortuneserver/localfortuneserver.debug", "/examples/ipc/localfortuneserver"},
{"/examples/threads/waitconditions/waitconditions.debug", "/examples/threads/waitconditions"},
{"/examples/threads/semaphores/semaphores.debug", "/examples/threads/semaphores"},
{"/examples/threads/mandelbrot/mandelbrot.debug", "/examples/threads/mandelbrot"},
{"/examples/dbus/listnames/listnames.debug", "/examples/dbus/listnames"},
{"/examples/dbus/pingpong/ping.debug", "/examples/dbus/pingpong"},
{"/examples/dbus/pingpong/pong.debug", "/examples/dbus/pingpong"},
{"/examples/dbus/complexpingpong/complexping.debug", "/examples/dbus/complexpingpong"},
{"/examples/dbus/complexpingpong/complexpong.debug", "/examples/dbus/complexpingpong"},
{"/examples/dbus/chat/dbus-chat.debug", "/examples/dbus/chat"},
{"/examples/dbus/remotecontrolledcar/car/car.debug", "/examples/dbus/remotecontrolledcar/car"},
{"/examples/dbus/remotecontrolledcar/controller/controller.debug", "/examples/dbus/remotecontrolledcar/controller"},
{"/examples/qtconcurrent/wordcount/wordcount.debug", "/examples/qtconcurrent/wordcount"},
{"/examples/qtconcurrent/runfunction/runfunction.debug", "/examples/qtconcurrent/runfunction"},
{"/examples/qtconcurrent/progressdialog/progressdialog.debug", "/examples/qtconcurrent/progressdialog"},
{"/examples/qtconcurrent/map/mapdemo.debug", "/examples/qtconcurrent/map"},
{"/examples/qtconcurrent/imagescaling/imagescaling.debug", "/examples/qtconcurrent/imagescaling"},
{"/examples/designer/calculatorform/calculatorform.debug", "/examples/designer/calculatorform"},
{"/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.debug", "/examples/designer/worldtimeclockbuilder"},
{"/examples/designer/calculatorbuilder/calculatorbuilder.debug", "/examples/designer/calculatorbuilder"},
{"/examples/sql/drilldown/drilldown.debug", "/examples/sql/drilldown"},
{"/examples/sql/masterdetail/masterdetail.debug", "/examples/sql/masterdetail"},
{"/examples/sql/tablemodel/tablemodel.debug", "/examples/sql/tablemodel"},
{"/examples/sql/relationaltablemodel/relationaltablemodel.debug", "/examples/sql/relationaltablemodel"},
{"/examples/sql/querymodel/querymodel.debug", "/examples/sql/querymodel"},
{"/examples/sql/cachedtable/cachedtable.debug", "/examples/sql/cachedtable"},
{"/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.debug", "/examples/xmlpatterns/qobjectxmlmodel"},
{"/examples/xmlpatterns/recipes/recipes.debug", "/examples/xmlpatterns/recipes"},
{"/examples/xmlpatterns/filetree/filetree.debug", "/examples/xmlpatterns/filetree"},
{"/examples/assistant/simpletextviewer/simpletextviewer.debug", "/examples/assistant/simpletextviewer"},
{"/examples/help/simpletextviewer/simpletextviewer.debug", "/examples/help/simpletextviewer"},
{"/examples/help/contextsensitivehelp/contextsensitivehelp.debug", "/examples/help/contextsensitivehelp"},
{"/examples/help/remotecontrol/remotecontrol.debug", "/examples/help/remotecontrol"},
{"/examples/opengl/grabber/grabber.debug", "/examples/opengl/grabber"},
{"/examples/opengl/framebufferobject2/framebufferobject2.debug", "/examples/opengl/framebufferobject2"},
{"/examples/opengl/hellogl/hellogl.debug", "/examples/opengl/hellogl"},
{"/examples/opengl/framebufferobject/framebufferobject.debug", "/examples/opengl/framebufferobject"},
{"/examples/opengl/overpainting/overpainting.debug", "/examples/opengl/overpainting"},
{"/examples/opengl/pbuffers2/pbuffers2.debug", "/examples/opengl/pbuffers2"},
{"/examples/opengl/2dpainting/2dpainting.debug", "/examples/opengl/2dpainting"},
{"/examples/opengl/pbuffers/pbuffers.debug", "/examples/opengl/pbuffers"},
{"/examples/opengl/samplebuffers/samplebuffers.debug", "/examples/opengl/samplebuffers"},
{"/examples/opengl/textures/textures.debug", "/examples/opengl/textures"},
{"/examples/graphicsview/elasticnodes/elasticnodes.debug", "/examples/graphicsview/elasticnodes"},
{"/examples/graphicsview/collidingmice/collidingmice.debug", "/examples/graphicsview/collidingmice"},
{"/examples/graphicsview/portedasteroids/portedasteroids.debug", "/examples/graphicsview/portedasteroids"},
{"/examples/graphicsview/padnavigator/padnavigator.debug", "/examples/graphicsview/padnavigator"},
{"/examples/graphicsview/portedcanvas/portedcanvas.debug", "/examples/graphicsview/portedcanvas"},
{"/examples/graphicsview/diagramscene/diagramscene.debug", "/examples/graphicsview/diagramscene"},
{"/examples/graphicsview/dragdroprobot/dragdroprobot.debug", "/examples/graphicsview/dragdroprobot"},
{"/examples/mainwindows/menus/menus.debug", "/examples/mainwindows/menus"},
{"/examples/mainwindows/mdi/mdi.debug", "/examples/mainwindows/mdi"},
{"/examples/mainwindows/sdi/sdi.debug", "/examples/mainwindows/sdi"},
{"/examples/mainwindows/recentfiles/recentfiles.debug", "/examples/mainwindows/recentfiles"},
{"/examples/mainwindows/application/application.debug", "/examples/mainwindows/application"},
{"/examples/mainwindows/dockwidgets/dockwidgets.debug", "/examples/mainwindows/dockwidgets"},
{"/examples/widgets/tablet/tablet.debug", "/examples/widgets/tablet"},
{"/examples/widgets/shapedclock/shapedclock.debug", "/examples/widgets/shapedclock"},
{"/examples/widgets/styles/styles.debug", "/examples/widgets/styles"},
{"/examples/widgets/icons/icons.debug", "/examples/widgets/icons"},
{"/examples/widgets/charactermap/charactermap.debug", "/examples/widgets/charactermap"},
{"/examples/widgets/sliders/sliders.debug", "/examples/widgets/sliders"},
{"/examples/widgets/tooltips/tooltips.debug", "/examples/widgets/tooltips"},
{"/examples/widgets/windowflags/windowflags.debug", "/examples/widgets/windowflags"},
{"/examples/widgets/stylesheet/stylesheet.debug", "/examples/widgets/stylesheet"},
{"/examples/widgets/spinboxes/spinboxes.debug", "/examples/widgets/spinboxes"},
{"/examples/widgets/validators/validators.debug", "/examples/widgets/validators"},
{"/examples/widgets/calculator/calculator.debug", "/examples/widgets/calculator"},
{"/examples/widgets/groupbox/groupbox.debug", "/examples/widgets/groupbox"},
{"/examples/widgets/scribble/scribble.debug", "/examples/widgets/scribble"},
{"/examples/widgets/imageviewer/imageviewer.debug", "/examples/widgets/imageviewer"},
{"/examples/widgets/digitalclock/digitalclock.debug", "/examples/widgets/digitalclock"},
{"/examples/widgets/lineedits/lineedits.debug", "/examples/widgets/lineedits"},
{"/examples/widgets/movie/movie.debug", "/examples/widgets/movie"},
{"/examples/widgets/calendarwidget/calendarwidget.debug", "/examples/widgets/calendarwidget"},
{"/examples/widgets/wiggly/wiggly.debug", "/examples/widgets/wiggly"},
{"/examples/widgets/analogclock/analogclock.debug", "/examples/widgets/analogclock"},
{"/examples/widgets/tetrix/tetrix.debug", "/examples/widgets/tetrix"},
{"/examples/painting/basicdrawing/basicdrawing.debug", "/examples/painting/basicdrawing"},
{"/examples/painting/svgviewer/svgviewer.debug", "/examples/painting/svgviewer"},
{"/examples/painting/fontsampler/fontsampler.debug", "/examples/painting/fontsampler"},
{"/examples/painting/concentriccircles/concentriccircles.debug", "/examples/painting/concentriccircles"},
{"/examples/painting/painterpaths/painterpaths.debug", "/examples/painting/painterpaths"},
{"/examples/painting/imagecomposition/imagecomposition.debug", "/examples/painting/imagecomposition"},
{"/examples/painting/transformations/transformations.debug", "/examples/painting/transformations"},
{"/examples/tools/customcompleter/customcompleter.debug", "/examples/tools/customcompleter"},
{"/examples/tools/codecs/codecs.debug", "/examples/tools/codecs"},
{"/examples/tools/plugandpaint/plugins/libpnp_extrafilters.so.debug", "/examples/tools/plugandpaint/plugins"},
{"/examples/tools/plugandpaint/plugandpaint.debug", "/examples/tools/plugandpaint"},
{"/examples/tools/regexp/regexp.debug", "/examples/tools/regexp"},
{"/examples/tools/undoframework/undoframework.debug", "/examples/tools/undoframework"},
{"/examples/tools/i18n/i18n.debug", "/examples/tools/i18n"},
{"/examples/tools/completer/completer.debug", "/examples/tools/completer"},
{"/examples/tools/echoplugin/plugin/libechoplugin.so.debug", "/examples/tools/echoplugin/plugin"},
{"/examples/tools/echoplugin/echoplugin.debug", "/examples/tools/echoplugin"},
{"/examples/tools/styleplugin/styles/libsimplestyleplugin.so.debug", "/examples/tools/styleplugin/styles"},
{"/examples/tools/styleplugin/styleplugin.debug", "/examples/tools/styleplugin"},
{"/examples/tools/treemodelcompleter/treemodelcompleter.debug", "/examples/tools/treemodelcompleter"},
{"/examples/tools/settingseditor/settingseditor.debug", "/examples/tools/settingseditor"},
{"/examples/network/securesocketclient/securesocketclient.debug", "/examples/network/securesocketclient"},
{"/examples/network/broadcastreceiver/broadcastreceiver.debug", "/examples/network/broadcastreceiver"},
{"/examples/network/downloadmanager/downloadmanager.debug", "/examples/network/downloadmanager"},
{"/examples/network/fortuneserver/fortuneserver.debug", "/examples/network/fortuneserver"},
{"/examples/network/loopback/loopback.debug", "/examples/network/loopback"},
{"/examples/network/http/http.debug", "/examples/network/http"},
{"/examples/network/ftp/ftp.debug", "/examples/network/ftp"},
{"/examples/network/download/download.debug", "/examples/network/download"},
{"/examples/network/fortuneclient/fortuneclient.debug", "/examples/network/fortuneclient"},
{"/examples/network/blockingfortuneclient/blockingfortuneclient.debug", "/examples/network/blockingfortuneclient"},
{"/examples/network/broadcastsender/broadcastsender.debug", "/examples/network/broadcastsender"},
{"/examples/network/threadedfortuneserver/threadedfortuneserver.debug", "/examples/network/threadedfortuneserver"},
{"/examples/network/chat/network-chat.debug", "/examples/network/chat"},
{"/examples/network/torrent/torrent.debug", "/examples/network/torrent"},
{"/examples/qtestlib/tutorial4/tutorial4.debug", "/examples/qtestlib/tutorial4"},
{"/examples/qtestlib/tutorial1/tutorial1.debug", "/examples/qtestlib/tutorial1"},
{"/examples/qtestlib/tutorial2/tutorial2.debug", "/examples/qtestlib/tutorial2"},
{"/examples/qtestlib/tutorial3/tutorial3.debug", "/examples/qtestlib/tutorial3"},
{"/examples/tutorials/tutorial/t3/t3.debug", "/examples/tutorials/tutorial/t3"},
{"/examples/tutorials/tutorial/t5/t5.debug", "/examples/tutorials/tutorial/t5"},
{"/examples/tutorials/tutorial/t2/t2.debug", "/examples/tutorials/tutorial/t2"},
{"/examples/tutorials/tutorial/t11/t11.debug", "/examples/tutorials/tutorial/t11"},
{"/examples/tutorials/tutorial/t6/t6.debug", "/examples/tutorials/tutorial/t6"},
{"/examples/tutorials/tutorial/t13/t13.debug", "/examples/tutorials/tutorial/t13"},
{"/examples/tutorials/tutorial/t12/t12.debug", "/examples/tutorials/tutorial/t12"},
{"/examples/tutorials/tutorial/t9/t9.debug", "/examples/tutorials/tutorial/t9"},
{"/examples/tutorials/tutorial/t1/t1.debug", "/examples/tutorials/tutorial/t1"},
{"/examples/tutorials/tutorial/t4/t4.debug", "/examples/tutorials/tutorial/t4"},
{"/examples/tutorials/tutorial/t14/t14.debug", "/examples/tutorials/tutorial/t14"},
{"/examples/tutorials/tutorial/t8/t8.debug", "/examples/tutorials/tutorial/t8"},
{"/examples/tutorials/tutorial/t7/t7.debug", "/examples/tutorials/tutorial/t7"},
{"/examples/tutorials/tutorial/t10/t10.debug", "/examples/tutorials/tutorial/t10"},
{"/examples/tutorials/addressbook/part2/part2.debug", "/examples/tutorials/addressbook/part2"},
{"/examples/tutorials/addressbook/part5/part5.debug", "/examples/tutorials/addressbook/part5"},
{"/examples/tutorials/addressbook/part3/part3.debug", "/examples/tutorials/addressbook/part3"},
{"/examples/tutorials/addressbook/part4/part4.debug", "/examples/tutorials/addressbook/part4"},
{"/examples/tutorials/addressbook/part7/part7.debug", "/examples/tutorials/addressbook/part7"},
{"/examples/tutorials/addressbook/part1/part1.debug", "/examples/tutorials/addressbook/part1"},
{"/examples/tutorials/addressbook/part6/part6.debug", "/examples/tutorials/addressbook/part6"},
{"/examples/xml/streambookmarks/streambookmarks.debug", "/examples/xml/streambookmarks"},
{"/examples/xml/saxbookmarks/saxbookmarks.debug", "/examples/xml/saxbookmarks"},
{"/examples/xml/xmlstreamlint/xmlstreamlint.debug", "/examples/xml/xmlstreamlint"},
{"/examples/xml/dombookmarks/dombookmarks.debug", "/examples/xml/dombookmarks"},
{"/examples/xml/rsslisting/rsslisting.debug", "/examples/xml/rsslisting"},
{"/examples/layouts/dynamiclayouts/dynamiclayouts.debug", "/examples/layouts/dynamiclayouts"},
{"/examples/layouts/flowlayout/flowlayout.debug", "/examples/layouts/flowlayout"},
{"/examples/layouts/borderlayout/borderlayout.debug", "/examples/layouts/borderlayout"},
{"/examples/layouts/basiclayouts/basiclayouts.debug", "/examples/layouts/basiclayouts"},
{"/examples/dialogs/trivialwizard/trivialwizard.debug", "/examples/dialogs/trivialwizard"},
{"/examples/dialogs/extension/extension.debug", "/examples/dialogs/extension"},
{"/examples/dialogs/standarddialogs/standarddialogs.debug", "/examples/dialogs/standarddialogs"},
{"/examples/dialogs/tabdialog/tabdialog.debug", "/examples/dialogs/tabdialog"},
{"/examples/dialogs/classwizard/classwizard.debug", "/examples/dialogs/classwizard"},
{"/examples/dialogs/findfiles/findfiles.debug", "/examples/dialogs/findfiles"},
{"/examples/dialogs/licensewizard/licensewizard.debug", "/examples/dialogs/licensewizard"},
{"/examples/dialogs/configdialog/configdialog.debug", "/examples/dialogs/configdialog"},
{"/examples/itemviews/coloreditorfactory/coloreditorfactory.debug", "/examples/itemviews/coloreditorfactory"},
{"/examples/itemviews/pixelator/pixelator.debug", "/examples/itemviews/pixelator"},
{"/examples/itemviews/simplewidgetmapper/simplewidgetmapper.debug", "/examples/itemviews/simplewidgetmapper"},
{"/examples/itemviews/puzzle/puzzle.debug", "/examples/itemviews/puzzle"},
{"/examples/itemviews/dirview/dirview.debug", "/examples/itemviews/dirview"},
{"/examples/itemviews/addressbook/addressbook.debug", "/examples/itemviews/addressbook"},
{"/examples/itemviews/spinboxdelegate/spinboxdelegate.debug", "/examples/itemviews/spinboxdelegate"},
{"/examples/itemviews/simpletreemodel/simpletreemodel.debug", "/examples/itemviews/simpletreemodel"},
{"/examples/itemviews/chart/chart.debug", "/examples/itemviews/chart"},
{"/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.debug", "/examples/itemviews/basicsortfiltermodel"},
{"/examples/itemviews/customsortfiltermodel/customsortfiltermodel.debug", "/examples/itemviews/customsortfiltermodel"},
{"/examples/itemviews/stardelegate/stardelegate.debug", "/examples/itemviews/stardelegate"},
{"/examples/itemviews/editabletreemodel/editabletreemodel.debug", "/examples/itemviews/editabletreemodel"},
{"/examples/itemviews/simpledommodel/simpledommodel.debug", "/examples/itemviews/simpledommodel"},
{"/examples/uitools/multipleinheritance/multipleinheritance.debug", "/examples/uitools/multipleinheritance"},
{"/examples/uitools/textfinder/textfinder.debug", "/examples/uitools/textfinder"},
{"/examples/script/helloscript/helloscript.debug", "/examples/script/helloscript"},
{"/examples/script/marshal/marshal.debug", "/examples/script/marshal"},
{"/examples/script/customclass/customclass.debug", "/examples/script/customclass"},
{"/examples/script/calculator/calculator.debug", "/examples/script/calculator"},
{"/examples/script/context2d/context2d.debug", "/examples/script/context2d"},
{"/examples/script/defaultprototypes/defaultprototypes.debug", "/examples/script/defaultprototypes"},
{"/examples/script/qscript/qscript.debug", "/examples/script/qscript"},
{"/examples/script/tetrix/tetrix.debug", "/examples/script/tetrix"},
{"/lib/libQtTest.so.4.4.3.debug", "/lib"},
{"/lib/libQtDesignerComponents.so.4.4.3.debug", "/lib"},
{"/lib/libQtScript.so.4.4.3.debug", "/lib"},
{"/lib/libQtDesigner.so.4.4.3.debug", "/lib"},
{"/lib/libQtGui.so.4.4.3.debug", "/lib"},
{"/lib/libQtSvg.so.4.4.3.debug", "/lib"},
{"/lib/libQtXml.so.4.4.3.debug", "/lib"},
{"/lib/libQtCLucene.so.4.4.3.debug", "/lib"},
{"/lib/libQtCore.so.4.4.3.debug", "/lib"},
{"/lib/libQtDBus.so.4.4.3.debug", "/lib"},
{"/lib/libQtXmlPatterns.so.4.4.3.debug", "/lib"},
{"/lib/libQtHelp.so.4.4.3.debug", "/lib"},
{"/lib/libQtSql.so.4.4.3.debug", "/lib"},
{"/lib/libQtNetwork.so.4.4.3.debug", "/lib"},
{"/lib/libQtOpenGL.so.4.4.3.debug", "/lib"},
{"/lib/libQt3Support.so.4.4.3.debug", "/lib"},
{"/lib/libQtAssistantClient.so.4.4.3.debug", "/lib"},
{"/lib/libQtWebKit.so.4.4.3.debug", "/lib"},
{"/demos/spreadsheet/spreadsheet.debug", "/demos/spreadsheet"},
{"/demos/composition/composition.debug", "/demos/composition"},
{"/demos/gradients/gradients.debug", "/demos/gradients"},
{"/demos/deform/deform.debug", "/demos/deform"},
{"/demos/embeddeddialogs/embeddeddialogs.debug", "/demos/embeddeddialogs"},
{"/demos/textedit/textedit.debug", "/demos/textedit"},
{"/demos/browser/browser.debug", "/demos/browser"},
{"/demos/interview/interview.debug", "/demos/interview"},
{"/demos/affine/affine.debug", "/demos/affine"},
{"/demos/books/books.debug", "/demos/books"},
{"/demos/chip/chip.debug", "/demos/chip"},
{"/demos/pathstroke/pathstroke.debug", "/demos/pathstroke"},
{"/demos/undo/undo.debug", "/demos/undo"},
{"/demos/sqlbrowser/sqlbrowser.debug", "/demos/sqlbrowser"},
{"/demos/mainwindow/mainwindow.debug", "/demos/mainwindow"},
{"/bin/qcollectiongenerator.debug", "/bin"},
{"/bin/qhelpconverter.debug", "/bin"},
{"/bin/lupdate.debug", "/bin"},
{"/bin/moc.debug", "/bin"},
{"/bin/pixeltool.debug", "/bin"},
{"/bin/qdbusviewer.debug", "/bin"},
{"/bin/qtconfig.debug", "/bin"},
{"/bin/qdbusxml2cpp.debug", "/bin"},
{"/bin/qdbus.debug", "/bin"},
{"/bin/uic3.debug", "/bin"},
{"/bin/qhelpgenerator.debug", "/bin"},
{"/bin/qt3to4.debug", "/bin"},
{"/bin/xmlpatterns.debug", "/bin"},
{"/bin/linguist.debug", "/bin"},
{"/bin/uic.debug", "/bin"},
{"/bin/qtdemo.debug", "/bin"},
{"/bin/lrelease.debug", "/bin"},
{"/bin/qmake", "/bin"},
{"/bin/assistant.debug", "/bin"},
{"/bin/rcc.debug", "/bin"},
{"/bin/designer.debug", "/bin"},
{"/bin/assistant_adp.debug", "/bin"},
{"/bin/qdbuscpp2xml.debug", "/bin"},
{"/plugins/codecs/libqkrcodecs.so.debug", "/src/plugins/codecs/kr"},
{"/plugins/codecs/libqtwcodecs.so.debug", "/src/plugins/codecs/tw"},
{"/plugins/codecs/libqcncodecs.so.debug", "/src/plugins/codecs/cn"},
{"/plugins/codecs/libqjpcodecs.so.debug", "/src/plugins/codecs/jp"},
{"/plugins/iconengines/libqsvgicon.so.debug", "/src/plugins/iconengines/svgiconengine"},
{"/plugins/sqldrivers/libqsqlmysql.so.debug", "/src/plugins/sqldrivers/mysql"},
{"/plugins/sqldrivers/libqsqlite.so.debug", "/src/plugins/sqldrivers/sqlite"},
{"/plugins/sqldrivers/libqsqlite2.so.debug", "/src/plugins/sqldrivers/sqlite2"},
{"/plugins/sqldrivers/libqsqlpsql.so.debug", "/src/plugins/sqldrivers/psql"},
{"/plugins/imageformats/libqgif.so.debug", "/src/plugins/imageformats/gif"},
{"/plugins/imageformats/libqtiff.so.debug", "/src/plugins/imageformats/tiff"},
{"/plugins/imageformats/libqsvg.so.debug", "/src/plugins/imageformats/svg"},
{"/plugins/imageformats/libqjpeg.so.debug", "/src/plugins/imageformats/jpeg"},
{"/plugins/imageformats/libqico.so.debug", "/src/plugins/imageformats/ico"},
{"/plugins/imageformats/libqmng.so.debug", "/src/plugins/imageformats/mng"},
{"/plugins/accessible/libqtaccessiblewidgets.so.debug", "/src/plugins/accessible/widgets"},
{"/plugins/accessible/libqtaccessiblecompatwidgets.so.debug", "/src/plugins/accessible/compat"},
{"/plugins/designer/libcontainerextension.so.debug", "/examples/designer/containerextension"},
{"/plugins/designer/libtaskmenuextension.so.debug", "/examples/designer/taskmenuextension"},
{"/plugins/designer/libqwebview.so.debug", "/tools/designer/src/plugins/qwebview"},
{"/plugins/designer/libcustomwidgetplugin.so.debug", "/examples/designer/customwidgetplugin"},
{"/plugins/designer/libarthurplugin.so.debug", "/demos/arthurplugin"},
{"/plugins/designer/libarthurplugin.so.debug", "/demos/shared"},
{"/plugins/designer/libqt3supportwidgets.so.debug", "/tools/designer/src/plugins/widgets"},
{"/plugins/designer/libworldtimeclockplugin.so.debug", "/examples/designer/worldtimeclockplugin"},
{"/plugins/inputmethods/libqimsw-multi.so.debug", "/src/plugins/inputmethods/imsw-multi"},
{"/plugins/script/libqtscriptdbus.so.debug", "/src/plugins/script/qtdbus"},
{"/examples/dbus/chat/dbus-chat.debug", "/examples/dbus/dbus-chat"},
{"/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.debug", "/tools/designer/src/uitools"},
{"/examples/designer/calculatorbuilder/calculatorbuilder.debug", "/tools/designer/src/uitools"},
{"/examples/tools/plugandpaint/plugins/libpnp_extrafilters.so.debug", "/examples/tools/plugandpaintplugins/extrafilters"},
{"/examples/tools/styleplugin/styles/libsimplestyleplugin.so.debug", "/examples/tools/styleplugin/plugin"},
{"/examples/network/chat/network-chat.debug", "/examples/network/network-chat"},
{"/examples/uitools/textfinder/textfinder.debug", "/tools/designer/src/uitools"},
{"/examples/script/calculator/calculator.debug", "/tools/designer/src/uitools"},
{"/examples/script/tetrix/tetrix.debug", "/tools/designer/src/uitools"},
{"/lib/libQtTest.so.4.4.3.debug", "/src/testlib"},
{"/lib/libQtDesignerComponents.so.4.4.3.debug", "/tools/designer/src/components"},
{"/lib/libQtScript.so.4.4.3.debug", "/src/script"},
{"/lib/libQtDesigner.so.4.4.3.debug", "/tools/designer/src/lib"},
{"/lib/libQtGui.so.4.4.3.debug", "/src/gui"},
{"/lib/libQtSvg.so.4.4.3.debug", "/src/svg"},
{"/lib/libQtXml.so.4.4.3.debug", "/src/xml"},
{"/lib/libQtCLucene.so.4.4.3.debug", "/tools/assistant/lib/fulltextsearch"},
{"/lib/libQtCore.so.4.4.3.debug", "/src/corelib"},
{"/lib/libQtDBus.so.4.4.3.debug", "/src/dbus"},
{"/lib/libQtXmlPatterns.so.4.4.3.debug", "/src/xmlpatterns"},
{"/lib/libQtHelp.so.4.4.3.debug", "/tools/assistant/lib"},
{"/lib/libQtSql.so.4.4.3.debug", "/src/sql"},
{"/lib/libQtNetwork.so.4.4.3.debug", "/src/network"},
{"/lib/libQtOpenGL.so.4.4.3.debug", "/src/opengl"},
{"/lib/libQt3Support.so.4.4.3.debug", "/src/qt3support"},
{"/lib/libQtAssistantClient.so.4.4.3.debug", "/tools/assistant/compat/lib"},
{"/lib/libQtWebKit.so.4.4.3.debug", "/src/3rdparty/webkit/WebCore"},
{"/demos/composition/composition.debug", "/demos/shared"},
{"/demos/gradients/gradients.debug", "/demos/shared"},
{"/demos/deform/deform.debug", "/demos/shared"},
{"/demos/browser/browser.debug", "/tools/designer/src/uitools"},
{"/demos/affine/affine.debug", "/demos/shared"},
{"/demos/pathstroke/pathstroke.debug", "/demos/shared"},
{"/bin/qcollectiongenerator.debug", "/tools/assistant/tools/qcollectiongenerator"},
{"/bin/qhelpconverter.debug", "/tools/assistant/tools/qhelpconverter"},
{"/bin/lupdate.debug", "/tools/linguist/lupdate"},
{"/bin/moc.debug", "/src/tools/moc"},
{"/bin/pixeltool.debug", "/tools/pixeltool"},
{"/bin/qdbusviewer.debug", "/tools/qdbus/qdbusviewer"},
{"/bin/qtconfig.debug", "/tools/qtconfig"},
{"/bin/qdbusxml2cpp.debug", "/tools/qdbus/qdbusxml2cpp"},
{"/bin/qdbus.debug", "/tools/qdbus/qdbus"},
{"/bin/uic3.debug", "/src/tools/uic3"},
{"/bin/qhelpgenerator.debug", "/tools/assistant/tools/qhelpgenerator"},
{"/bin/qt3to4.debug", "/tools/porting/src"},
{"/bin/xmlpatterns.debug", "/tools/xmlpatterns"},
{"/bin/linguist.debug", "/tools/designer/src/uitools"},
{"/bin/linguist.debug", "/tools/linguist/linguist"},
{"/bin/uic.debug", "/src/tools/uic"},
{"/bin/qtdemo.debug", "/demos/qtdemo"},
{"/bin/lrelease.debug", "/tools/linguist/lrelease"},
{"/bin/qmake", "/qmake"},
{"/bin/assistant.debug", "/tools/assistant/tools/assistant"},
{"/bin/rcc.debug", "/src/tools/rcc"},
{"/bin/designer.debug", "/tools/designer/src/designer"},
{"/bin/assistant_adp.debug", "/tools/assistant/compat"},
{"/bin/qdbuscpp2xml.debug", "/tools/qdbus/qdbuscpp2xml"}
#endif
};
for (int i = 0; i < (int)(sizeof(libraries) / sizeof(libraries[0])); i++) {
// USAGE NOTE: Don't use FILENAME_MAX as the size of an array in which to store a file name!
// [In some cases] you [may not be able to statically] make an array that big!
// Use dynamic allocation [..] instead.
// From http://www.gnu.org/software/libc/manual/html_mono/libc.html#Limits-for-Files
// Make filename
char * const fileName = allocFileNameCopyAppend(baseQtPath, libraries[i].fileName);
logFileName(fileName);
// Make old source path array
char * const oldSourcePath = allocFileNameCopyAppend(oldSourceBase,
libraries[i].sourceLocation);
// Make new source path array
char * const newSourcePath = allocFileNameCopyAppend(baseQtPath,
libraries[i].sourceLocation);
logDiff(oldSourcePath, newSourcePath);
// Patch
BinPatch binFile(fileName);
if (!binFile.patch(oldSourcePath, newSourcePath)) {
result = false;
}
delete[] fileName;
delete[] oldSourcePath;
delete[] newSourcePath;
if (!result)
break;
}
return result;
}
void patchQMakeSpec(const char *path)
{
QString baseQtPath(path);
const QString fileName(baseQtPath + "/mkspecs/default/qmake.conf");
QFile f(fileName);
logFileName(qPrintable(fileName));
f.open(QIODevice::ReadOnly);
QTextStream in(&f);
QString all = in.readAll();
f.close();
// Old value is QMAKESPEC_ORIGINAL=C:/somepath/mkspecs/amakespce
// New value should be QMAKESPEC_ORIGINAL=baseQtPath/mkspec/amakespec
// We don't care to match the line end we simply match to the end of the file
QRegExp regExp("(QMAKESPEC_ORIGINAL=).*(/mkspecs/.*)");
all.replace(regExp, "\\1"+baseQtPath+"\\2");
f.open(QIODevice::WriteOnly);
QTextStream out(&f);
out << all;
}
const char * const textFileFileNames[] =
{
#ifndef Q_OS_WIN
// *.la
"lib/libQtCore.la",
"lib/libQt3Support.la",
"lib/libQtCLucene.la",
"lib/libQtDBus.la",
"lib/libQtGui.la",
"lib/libQtHelp.la",
"lib/libQtNetwork.la",
"lib/libQtOpenGL.la",
"lib/libQtScript.la",
"lib/libQtSql.la",
"lib/libQtSvg.la",
"lib/libQtTest.la",
"lib/libQtWebKit.la",
"lib/libQtXml.la",
"lib/libQtXmlPatterns.la",
// *.prl
"demos/shared/libdemo_shared.prl",
"lib/libQt3Support.prl",
"lib/libQtAssistantClient.prl",
"lib/libQtCLucene.prl",
"lib/libQtCore.prl",
"lib/libQtDBus.prl",
"lib/libQtDesignerComponents.prl",
"lib/libQtDesigner.prl",
"lib/libQtGui.prl",
"lib/libQtHelp.prl",
"lib/libQtNetwork.prl",
"lib/libQtOpenGL.prl",
"lib/libQtScript.prl",
"lib/libQtSql.prl",
"lib/libQtSvg.prl",
"lib/libQtTest.prl",
"lib/libQtUiTools.prl",
"lib/libQtWebKit.prl",
"lib/libQtXmlPatterns.prl",
"lib/libQtXml.prl",
// *.pc
"lib/pkgconfig/Qt3Support.pc",
"lib/pkgconfig/QtAssistantClient.pc",
"lib/pkgconfig/QtCLucene.pc",
"lib/pkgconfig/QtCore.pc",
"lib/pkgconfig/QtDBus.pc",
"lib/pkgconfig/QtDesignerComponents.pc",
"lib/pkgconfig/QtDesigner.pc",
"lib/pkgconfig/QtGui.pc",
"lib/pkgconfig/QtHelp.pc",
"lib/pkgconfig/QtNetwork.pc",
"lib/pkgconfig/QtOpenGL.pc",
"lib/pkgconfig/QtScript.pc",
"lib/pkgconfig/QtSql.pc",
"lib/pkgconfig/QtSvg.pc",
"lib/pkgconfig/QtTest.pc",
"lib/pkgconfig/QtUiTools.pc",
"lib/pkgconfig/QtWebKit.pc",
"lib/pkgconfig/QtXmlPatterns.pc",
"lib/pkgconfig/QtXml.pc",
// misc
"mkspecs/qconfig.pri"
#endif
};
void replaceInTextFile(const char * fileName,
const char * oldText, const char * newText,
const char * oldText2 = NULL, const char * newText2 = NULL)
{
const QString errorMessage = QString("Could not patch file ") + fileName;
QFile f(fileName);
if (!f.open(QIODevice::ReadOnly)) {
std::cout << qPrintable(errorMessage) << std::endl;
return;
}
QTextStream in(&f);
QString all = in.readAll();
f.close();
all.replace(QString(oldText), QString(newText), Qt::CaseSensitive);
if ((oldText2 != NULL) && (newText2 != NULL)) {
all = all.replace(QString(oldText2), QString(newText2), Qt::CaseSensitive);
}
if (!f.open(QIODevice::WriteOnly)) {
std::cout << qPrintable(errorMessage) << std::endl;
return;
}
QTextStream out(&f);
out << all;
f.close();
}
void patchTextFiles(const char *newInstallBase)
{
const char * const newSourceBase = newInstallBase;
const int fileCount = sizeof(textFileFileNames) / sizeof(const char *);
for (int i = 0; i < fileCount; i++) {
logFileName(textFileFileNames[i]);
logDiff(oldSourceBase, newSourceBase);
#ifndef Q_OS_WIN
logDiff(oldInstallBase, newInstallBase);
#endif
replaceInTextFile(textFileFileNames[i],
#ifndef Q_OS_WIN
oldSourceBase, newSourceBase,
#endif
oldInstallBase, newInstallBase);
}
patchQMakeSpec(newInstallBase);
}
int main(int argc, char *args[])
{
if (argc != 2) {
printf("Please provide a QTDIR value as parameter.\n"
"This is also the location where the binaries are expected\n"
"in the \"/bin\" and \"/plugins\" subdirectories.\n");
return 1;
}
char * const baseQtPath = allocFileNameCopyAppend(args[1], "");
#ifdef Q_OS_WIN
// Convert backslash to slash
for (char *p = baseQtPath; *p != '\0'; p++)
if (*p == '\\')
*p = '/';
#endif
// Remove trailing slash(es)
for (char *p = baseQtPath + strlen(baseQtPath) - 1; p != baseQtPath; p--)
if (*p == '/')
*p = '\0';
else
break;
patchTextFiles(baseQtPath);
const bool success = patchBinariesWithQtPathes(baseQtPath)
&& patchDebugLibrariesWithQtPath(baseQtPath);
delete[] baseQtPath;
return success ? 0 : 1;
}

View File

@@ -2,7 +2,7 @@
** **
** This file is part of Qt Creator ** This file is part of Qt Creator
** **
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** **
** Contact: Qt Software Information (qt-info@nokia.com) ** Contact: Qt Software Information (qt-info@nokia.com)
** **

View File

@@ -2,7 +2,7 @@
** **
** This file is part of Qt Creator ** This file is part of Qt Creator
** **
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** **
** Contact: Qt Software Information (qt-info@nokia.com) ** Contact: Qt Software Information (qt-info@nokia.com)
** **

View File

@@ -2,7 +2,7 @@
** **
** This file is part of Qt Creator ** This file is part of Qt Creator
** **
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** **
** Contact: Qt Software Information (qt-info@nokia.com) ** Contact: Qt Software Information (qt-info@nokia.com)
** **

View File

@@ -2,7 +2,7 @@
** **
** This file is part of Qt Creator ** This file is part of Qt Creator
** **
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** **
** Contact: Qt Software Information (qt-info@nokia.com) ** Contact: Qt Software Information (qt-info@nokia.com)
** **

View File

@@ -2,7 +2,7 @@
** **
** This file is part of Qt Creator ** This file is part of Qt Creator
** **
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** **
** Contact: Qt Software Information (qt-info@nokia.com) ** Contact: Qt Software Information (qt-info@nokia.com)
** **

View File

@@ -2,7 +2,7 @@
** **
** This file is part of Qt Creator ** This file is part of Qt Creator
** **
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** **
** Contact: Qt Software Information (qt-info@nokia.com) ** Contact: Qt Software Information (qt-info@nokia.com)
** **