Commit 87d125db authored by Kavindra Devi Palaraja's avatar Kavindra Devi Palaraja

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

parents d37363f3 f7da76ab
......@@ -62,9 +62,10 @@ int qtGhVersion = QT_VERSION;
#endif
#if USE_QT_GUI
# include <QtGui/QWidget>
# include <QtGui/QPixmap>
# include <QtGui/QApplication>
# include <QtGui/QImage>
# include <QtGui/QPixmap>
# include <QtGui/QWidget>
#endif
#ifdef Q_OS_WIN
......@@ -1457,7 +1458,9 @@ static void qDumpQHashNode(QDumper &d)
static void qDumpQImage(QDumper &d)
{
const QImage &im = *reinterpret_cast<const QImage *>(d.data);
d.putItem("value", "(").put(im.width()).put("x").put(im.height()).put(")");
d.beginItem("value");
d.put("(").put(im.width()).put("x").put(im.height()).put(")");
d.endItem();
d.putItem("type", NS"QImage");
d.putItem("numchild", "1");
if (d.dumpChildren) {
......@@ -2234,7 +2237,9 @@ static void qDumpQObjectSlotList(QDumper &d)
static void qDumpQPixmap(QDumper &d)
{
const QPixmap &im = *reinterpret_cast<const QPixmap *>(d.data);
d.putItem("value", "(").put(im.width()).put("x").put(im.height()).put(")");
d.beginItem("value");
d.put("(").put(im.width()).put("x").put(im.height()).put(")");
d.endItem();
d.putItem("type", NS"QPixmap");
d.putItem("numchild", "0");
d.disarm();
......@@ -2455,7 +2460,7 @@ static void qDumpQVariant(QDumper &d)
d.putItem("value", "(invalid)");
} else if (value.isEmpty()) {
d.beginItem("value");
d.put("(").put(v.typeName()).put(") ").put(qPrintable(value));
d.put("(").put(v.typeName()).put(") ");
d.endItem();
} else {
QByteArray ba;
......@@ -2464,7 +2469,7 @@ static void qDumpQVariant(QDumper &d)
ba += ") ";
ba += qPrintable(value);
d.putItem("value", ba);
d.putItem("valueencoded", "4");
d.putItem("valueencoded", "5");
}
d.putItem("type", NS"QVariant");
d.putItem("numchild", (isInvalid ? "0" : "1"));
......@@ -3023,6 +3028,14 @@ static void handleProtocolVersion2and3(QDumper & d)
} // anonymous namespace
#if USE_QT_GUI
extern "C" Q_DECL_EXPORT
void *watchPoint(int x, int y)
{
return QApplication::widgetAt(x, y);
}
#endif
extern "C" Q_DECL_EXPORT
void *qDumpObjectData440(
int protocolVersion,
......@@ -3115,7 +3128,7 @@ void *qDumpObjectData440(
.put(""NS"QStringList=\"").put(sizeof(QStringList)).put("\",")
.put(""NS"QObject=\"").put(sizeof(QObject)).put("\",")
#if USE_QT_GUI
.put(""NS"QWidget=\"").put(sizeof(QWidget)<< "\",")
.put(""NS"QWidget=\"").put(sizeof(QWidget)).put("\",")
#endif
#ifdef Q_OS_WIN
.put("string=\"").put(sizeof(std::string)).put("\",")
......
TEMPLATE = lib
CONFIG += shared
QT = core
linux-* {
CONFIG -= release
CONFIG += debug
}
SOURCES=gdbmacros.cpp
true {
false {
DEFINES += USE_QT_GUI=0
QT = core
} else {
......
<!DOCTYPE QPH>
<QPH language="fr">
<phrase>
<source>debugger</source>
<target>débogueur</target>
</phrase>
<phrase>
<source>Start Debugger</source>
<target>Lancer le débogueur</target>
</phrase>
<phrase>
<source>Executable:</source>
<target>Exécutable:</target>
</phrase>
<phrase>
<source>Filter:</source>
<target>Filtre:</target>
</phrase>
<phrase>
<source>Clear</source>
<target>Effacer</target>
</phrase>
<phrase>
<source>Host and port:</source>
<target>Hôte et port:</target>
</phrase>
<phrase>
<source>Architecture:</source>
<target>Architecture:</target>
</phrase>
<phrase>
<source>Server start script:</source>
<target>Script de démarrage du serveur:</target>
</phrase>
<phrase>
<source>&amp;Undo</source>
<target>Annu&amp;ler</target>
</phrase>
<phrase>
<source>Add Bookmark</source>
<target>Ajouter un signet</target>
</phrase>
<phrase>
<source>Bookmark:</source>
<target>Signet:</target>
</phrase>
<phrase>
<source>Add in Folder:</source>
<target>Ajouter dans le dossier:</target>
</phrase>
<phrase>
<source>+</source>
<target>+</target>
</phrase>
<phrase>
<source>New Folder</source>
<target>Nouveau Dossier</target>
</phrase>
<phrase>
<source>Bookmarks</source>
<target>Signets</target>
</phrase>
<phrase>
<source>Rename Folder</source>
<target>Renommer le Dossier</target>
</phrase>
<phrase>
<source>Bookmark</source>
<target>Signet</target>
</phrase>
<phrase>
<source>Remove</source>
<target>Retirer</target>
</phrase>
<phrase>
<source>Delete Folder</source>
<target>Supprimer le Dossier</target>
</phrase>
<phrase>
<source>Show Bookmark</source>
<target>Afficher le Signet</target>
</phrase>
<phrase>
<source>Show Bookmark in New Tab</source>
<target>Afficher le Signet dans un Nouvel Onglet</target>
</phrase>
<phrase>
<source>Delete Bookmark</source>
<target>Supprimer le Signet</target>
</phrase>
<phrase>
<source>Rename Bookmark</source>
<target>Renommer le Signet</target>
</phrase>
<phrase>
<source>Add</source>
<target>Ajouter</target>
</phrase>
<phrase>
<source>Move Up</source>
<target>Vers le Haut</target>
</phrase>
<phrase>
<source>Move Down</source>
<target>Vers le Bas</target>
</phrase>
<phrase>
<source>Previous Bookmark</source>
<target>Signet Précédent</target>
</phrase>
<phrase>
<source>Next Bookmark</source>
<target>Signet Suivant</target>
</phrase>
<phrase>
<source>Condition:</source>
<target>Condition:</target>
</phrase>
<phrase>
<source>Working Directory:</source>
<target>Répertoire de Travail:</target>
</phrase>
<phrase>
<source>Environment</source>
<target>Environnement</target>
</phrase>
<phrase>
<source>Arguments</source>
<target>Arguments</target>
</phrase>
<phrase>
<source>Build directory:</source>
<target>Répertoire de compilation:</target>
</phrase>
<phrase>
<source>Path:</source>
<target>Chemin:</target>
</phrase>
<phrase>
<source>CodePaster Error</source>
<target>Erreur dans CodePaster</target>
</phrase>
<phrase>
<source>General</source>
<target>Général</target>
</phrase>
<phrase>
<source>Username:</source>
<target>Nom d&apos;utilisateur:</target>
</phrase>
<phrase>
<source>CodePaster</source>
<target>CodePaster</target>
</phrase>
<phrase>
<source>User interface</source>
<target>Interface utilisateur</target>
</phrase>
<phrase>
<source>&lt;unlimited&gt;</source>
<target>&lt;illimitée&gt;</target>
</phrase>
<phrase>
<source>Open Link</source>
<target>Ouvrir le Lien</target>
</phrase>
<phrase>
<source> [read only]</source>
<target> [lecture seule]</target>
</phrase>
<phrase>
<source> [directory]</source>
<target> [répertoire]</target>
</phrase>
<phrase>
<source>Close</source>
<target>Fermer</target>
</phrase>
<phrase>
<source>Close All</source>
<target>Fermer Tout</target>
</phrase>
<phrase>
<source>Failed!</source>
<target>Échec!</target>
</phrase>
<phrase>
<source>Proceed</source>
<target>Continuer</target>
</phrase>
<phrase>
<source>Cancel</source>
<target>Annuler</target>
</phrase>
<phrase>
<source>Make writable</source>
<target>Rendre Inscriptible</target>
</phrase>
<phrase>
<source>Qt Creator</source>
<target>Qt Creator</target>
</phrase>
<phrase>
<source>&amp;File</source>
<target>&amp;Fichier</target>
</phrase>
<phrase>
<source>&amp;Edit</source>
<target>&amp;Édition</target>
</phrase>
<phrase>
<source>&amp;Redo</source>
<target>Re&amp;faire</target>
</phrase>
<phrase>
<source>Activate %1</source>
<target>Activer %1</target>
</phrase>
<phrase>
<source>Split</source>
<target>Scinder</target>
</phrase>
<phrase>
<source>New Project</source>
<target>Nouveau Projet</target>
</phrase>
<phrase>
<source>Close %1</source>
<target>Fermer %1</target>
</phrase>
<phrase>
<source>*</source>
<target>*</target>
</phrase>
<phrase>
<source>&amp;Undo</source>
<target>Annu&amp;ler</target>
</phrase>
<phrase>
<source>Bookmarks</source>
<target>Signets</target>
</phrase>
<phrase>
<source>New Folder</source>
<target>Nouveau dossier</target>
</phrase>
<phrase>
<source>Bookmark</source>
<target>Signet</target>
</phrase>
<phrase>
<source>Bookmarks</source>
<target>Signets</target>
</phrase>
<phrase>
<source>New Folder</source>
<target>Nouveau dossier</target>
</phrase>
<phrase>
<source>Add</source>
<target>Ajouter</target>
</phrase>
<phrase>
<source>&amp;Change</source>
<target>&amp;Modifier</target>
</phrase>
<phrase>
<source>Close</source>
<target>Fermer</target>
</phrase>
<phrase>
<source>General</source>
<target>Général</target>
</phrase>
<phrase>
<source>Close %1</source>
<target>Fermer %1</target>
</phrase>
<phrase>
<source>Close Other Editors</source>
<target>Fermer les autres éditeurs</target>
</phrase>
<phrase>
<source>Close All Except %1</source>
<target>Fermer tout sauf %1</target>
</phrase>
<phrase>
<source>C++</source>
<target></target>
</phrase>
</QPH>
......@@ -38,10 +38,22 @@ FastPreprocessor::FastPreprocessor(const Snapshot &snapshot)
QByteArray FastPreprocessor::run(QString fileName, const QString &source)
{
#ifdef QTCREATOR_WITH_MERGED_ENVIRONMENT
if (Document::Ptr doc = _snapshot.value(fileName)) {
_merged.insert(fileName);
foreach (const Document::Include &i, doc->includes())
mergeEnvironment(i.fileName());
}
#endif
const QByteArray preprocessed = _preproc(fileName, source);
return preprocessed;
}
void FastPreprocessor::sourceNeeded(QString &fileName, IncludeType, unsigned)
{ mergeEnvironment(fileName); }
void FastPreprocessor::mergeEnvironment(const QString &fileName)
{
if (! _merged.contains(fileName)) {
......
......@@ -54,8 +54,7 @@ public:
QByteArray run(QString fileName, const QString &source);
// CPlusPlus::Client
virtual void sourceNeeded(QString &fileName, IncludeType, unsigned)
{ mergeEnvironment(fileName); }
virtual void sourceNeeded(QString &fileName, IncludeType, unsigned);
virtual void macroAdded(const Macro &) {}
......
......@@ -771,7 +771,11 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
} else {
if (_dot->whitespace) {
const unsigned endOfPreviousToken = (_dot - 1)->end();
unsigned endOfPreviousToken = 0;
if (_dot != _tokens.constBegin())
endOfPreviousToken = (_dot - 1)->end();
const unsigned beginOfToken = _dot->begin();
const char *start = _source.constBegin() + endOfPreviousToken;
......
......@@ -107,6 +107,14 @@ SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &title)
return item;
}
void SideBar::removeSideBarWidget(SideBarWidget *widget)
{
widget->removeCurrentItem();
m_widgets.removeOne(widget);
widget->hide();
widget->deleteLater();
}
void SideBar::split()
{
SideBarWidget *original = qobject_cast<SideBarWidget*>(sender());
......@@ -121,10 +129,7 @@ void SideBar::close()
SideBarWidget *widget = qobject_cast<SideBarWidget*>(sender());
if (!widget)
return;
widget->removeCurrentItem();
m_widgets.removeOne(widget);
widget->hide();
widget->deleteLater();
removeSideBarWidget(widget);
updateWidgets();
}
}
......@@ -148,6 +153,9 @@ void SideBar::saveSettings(QSettings *settings)
void SideBar::readSettings(QSettings *settings)
{
foreach (SideBarWidget *widget, m_widgets)
removeSideBarWidget(widget);
if (settings->contains("HelpSideBar/Views")) {
QStringList views = settings->value("HelpSideBar/Views").toStringList();
if (views.count()) {
......
......@@ -31,6 +31,7 @@
#define SIDEBAR_H
#include <QtCore/QMap>
#include <QtCore/QPointer>
#include <QtGui/QWidget>
#include <QtGui/QComboBox>
......@@ -117,6 +118,8 @@ private slots:
private:
Internal::SideBarWidget *insertSideBarWidget(int position,
const QString &title = QString());
void removeSideBarWidget(Internal::SideBarWidget *widget);
QList<Internal::SideBarWidget*> m_widgets;
QMap<QString, SideBarItem*> m_itemMap;
......
......@@ -165,6 +165,9 @@ DebuggerSettings *DebuggerSettings::instance()
item = new SavedAction(instance);
instance->insertItem(AssignType, item);
item = new SavedAction(instance);
instance->insertItem(WatchPoint, item);
//
// DebuggingHelper
//
......@@ -173,18 +176,21 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Use debugging helper"));
item->setCheckable(true);
item->setDefaultValue(true);
item->setValue(true);
instance->insertItem(UseDebuggingHelpers, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("UseCustomDebuggingHelperLocation"));
item->setCheckable(true);
item->setDefaultValue(false);
item->setValue(false);
instance->insertItem(UseCustomDebuggingHelperLocation, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("CustomDebuggingHelperLocation"));
item->setCheckable(true);
item->setDefaultValue(QString());
item->setValue(QString());
instance->insertItem(CustomDebuggingHelperLocation, item);
item = new SavedAction(instance);
......@@ -192,6 +198,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Debug debugging helper"));
item->setCheckable(true);
item->setDefaultValue(false);
item->setValue(false);
instance->insertItem(DebugDebuggingHelpers, item);
......
......@@ -94,7 +94,7 @@ enum DebuggerActionCode
WatchExpression,
WatchExpressionInWindow,
RemoveWatchExpression,
WatchModelUpdate,
WatchPoint,
UseToolTips,
AssignValue,
AssignType,
......
......@@ -434,7 +434,8 @@ void DebuggerManager::init()
connect(theDebuggerAction(ExecuteCommand), SIGNAL(triggered()),
this, SLOT(executeDebuggerCommand()));
connect(theDebuggerAction(WatchPoint), SIGNAL(triggered()),
this, SLOT(watchPoint()));
m_breakDock = createDockForWidget(m_breakWindow);
......@@ -1089,6 +1090,13 @@ void DebuggerManager::nextIExec()
m_engine->nextIExec();
}
void DebuggerManager::watchPoint()
{
if (QAction *action = qobject_cast<QAction *>(sender()))
if (m_engine)
m_engine->watchPoint(action->data().toPoint());
}
void DebuggerManager::executeDebuggerCommand()
{
if (QAction *action = qobject_cast<QAction *>(sender()))
......
......@@ -318,6 +318,8 @@ public slots:
void executeDebuggerCommand();
void executeDebuggerCommand(const QString &command);
void watchPoint();
void showStatusMessage(const QString &msg, int timeout = -1); // -1 forever
private slots:
......
......@@ -58,8 +58,8 @@ using ProjectExplorer::ApplicationRunConfiguration;