Commit 081bdef0 authored by con's avatar con
Browse files

Merge commit 'origin/1.2'

parents 92457dc7 cd6e8d4a
......@@ -2,6 +2,7 @@ include(../../qtcreator.pri)
TEMPLATE = app
TARGET = phony_target
CONFIG -= qt
QT =
LIBS =
......@@ -10,10 +11,13 @@ isEmpty(vcproj) {
OBJECTS_DIR =
win32:CONFIG -= embed_manifest_exe
} else {
CONFIG += console
PHONY_DEPS = .
phony_src.input = PHONY_DEPS
phony_src.output = phony.c
phony_src.variable_out = GENERATED_SOURCES
phony_src.commands = echo int main() { return 0; } > phony.c
phony_src.name = CREATE phony.c
phony_src.CONFIG += combine
QMAKE_EXTRA_COMPILERS += phony_src
}
......@@ -33,8 +37,9 @@ DATA_DIRS = \
FILES += $$files
}
copy2build.target = $$IDE_DATA_PATH
copy2build.input = FILES
copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir}
copy2build.output = ${QMAKE_FUNC_FILE_IN_stripSrcDir}
isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
copy2build.name = COPY ${QMAKE_FILE_IN}
......
......@@ -19,10 +19,11 @@ QMAKE_EXTRA_TARGETS += ts
TEMPLATE = app
TARGET = phony_target2
CONFIG -= qt
QT =
LIBS =
updateqm.target = $$IDE_DATA_DIR/translations
updateqm.target = $$IDE_DATA_PATH/translations
updateqm.input = TS_FILES
updateqm.output = ${QMAKE_FILE_BASE}.qm
isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS
......@@ -36,10 +37,13 @@ isEmpty(vcproj) {
OBJECTS_DIR =
win32:CONFIG -= embed_manifest_exe
} else {
CONFIG += console
PHONY_DEPS = .
phony_src.input = PHONY_DEPS
phony_src.output = phony.c
phony_src.variable_out = GENERATED_SOURCES
phony_src.commands = echo int main() { return 0; } > phony.c
phony_src.name = CREATE phony.c
phony_src.CONFIG += combine
QMAKE_EXTRA_COMPILERS += phony_src
}
......
TEMPLATE = subdirs
SUBDIRS = qtcreator/static.pro qtcreator/translations
win32 {
SUBDIRS += qtcreator/qtcdebugger
}
......@@ -135,8 +135,10 @@ CdbDebugOutput::CdbDebugOutput()
{
}
void CdbDebugOutput::output(ULONG mask, const QString &msg)
void CdbDebugOutput::output(ULONG mask, const QString &_msg)
{
QString msg = _msg + '\n';
if (debugCDB > 1)
qDebug() << Q_FUNC_INFO << "\n " << msg;
......
......@@ -97,6 +97,8 @@ using namespace TextEditor;
namespace Debugger {
namespace Constants {
const char * const M_DEBUG_START_DEBUGGING = "QtCreator.Menu.Debug.StartDebugging";
const char * const STARTEXTERNAL = "Debugger.StartExternal";
const char * const ATTACHEXTERNAL = "Debugger.AttachExternal";
const char * const ATTACHCORE = "Debugger.AttachCore";
......@@ -597,22 +599,25 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
Core::ActionContainer *mdebug =
am->actionContainer(ProjectExplorer::Constants::M_DEBUG);
Core::ActionContainer *mstart =
am->actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
Core::Command *cmd = 0;
cmd = am->registerAction(m_manager->m_continueAction,
ProjectExplorer::Constants::DEBUG, QList<int>() << m_gdbRunningContext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_startExternalAction,
Constants::STARTEXTERNAL, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_attachExternalAction,
Constants::ATTACHEXTERNAL, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_attachCoreAction,
Constants::ATTACHCORE, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
/*
cmd = am->registerAction(m_attachTcfAction,
Constants::ATTACHTCF, globalcontext);
......@@ -621,7 +626,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
cmd = am->registerAction(m_startRemoteAction,
Constants::ATTACHREMOTE, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
cmd = am->registerAction(m_detachAction,
Constants::DETACH, globalcontext);
......
......@@ -1494,8 +1494,7 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
QString scriptFileName = theDebuggerStringSetting(GdbScriptFile);
if (!scriptFileName.isEmpty()) {
QFile scriptFile(scriptFileName);
if (scriptFile.open(QIODevice::ReadOnly)) {
if (QFileInfo(scriptFileName).isReadable()) {
postCommand(_("source ") + scriptFileName);
} else {
QMessageBox::warning(q->mainWindow(),
......
......@@ -279,6 +279,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mdebug->menu()->setTitle(tr("&Debug"));
menubar->addMenu(mdebug, Core::Constants::G_VIEW);
Core::ActionContainer *mstartdebugging =
am->createMenu(Constants::M_DEBUG_STARTDEBUGGING);
mstartdebugging->menu()->setTitle(tr("&Start Debugging"));
mdebug->addMenu(mstartdebugging, Core::Constants::G_DEFAULT_ONE);
//
// Groups
......@@ -600,7 +604,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
cmd->setAttribute(Core::Command::CA_UpdateIcon);
cmd->setDefaultText(tr("Start Debugging"));
cmd->setDefaultKeySequence(QKeySequence(tr("F5")));
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
mstartdebugging->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
modeManager->addAction(cmd, Constants::P_ACTION_DEBUG, m_runConfigurationMenu);
// add new file action
......
......@@ -90,6 +90,7 @@ const char * const LANG_CXX = "CXX";
const char * const M_RECENTPROJECTS = "ProjectExplorer.Menu.Recent";
const char * const M_BUILDPROJECT = "ProjectExplorer.Menu.Build";
const char * const M_DEBUG = "ProjectExplorer.Menu.Debug";
const char * const M_DEBUG_STARTDEBUGGING = "ProjectExplorer.Menu.Debug.StartDebugging";
const char * const M_SESSION = "ProjectExplorer.Menu.Session";
// toolbars
......
......@@ -57,7 +57,8 @@ namespace {
bool debug = false;
}
ProjectWindow::ProjectWindow(QWidget *parent) : QWidget(parent)
ProjectWindow::ProjectWindow(QWidget *parent)
: QWidget(parent), m_currentItemChanged(false)
{
setWindowTitle(tr("Project Explorer"));
setWindowIcon(QIcon(":/projectexplorer/images/projectexplorer.png"));
......@@ -253,16 +254,20 @@ Project *ProjectWindow::findProject(const QString &path) const
void ProjectWindow::handleCurrentItemChanged(QTreeWidgetItem *current)
{
if (m_currentItemChanged)
return;
m_currentItemChanged = true;
if (current) {
QString path = current->data(2, Qt::UserRole).toString();
if (Project *project = findProject(path)) {
m_projectExplorer->setCurrentFile(project, path);
showProperties(project, QModelIndex());
m_currentItemChanged = false;
return;
}
} else {
showProperties(0, QModelIndex());
}
showProperties(0, QModelIndex());
m_currentItemChanged = false;
}
......
......@@ -79,6 +79,7 @@ private:
QList<PropertiesPanel*> m_panels;
Project *findProject(const QString &path) const;
bool m_currentItemChanged;
};
} // namespace Internal
......
......@@ -107,7 +107,6 @@ QtVersionManager::QtVersionManager()
connect(this, SIGNAL(updatedExamples(QString,QString,QString)),
welcomeMode, SIGNAL(updatedExamples(QString,QString, QString)));
}
else
updateDocumentation();
updateExamples();
}
......
......@@ -4,6 +4,5 @@ CONFIG += ordered
SUBDIRS = \
libs \
app \
plugins
plugins \
tools
TEMPLATE = subdirs
win32:SUBDIRS = qtcdebugger
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment