Commit 468b76ff authored by con's avatar con
Browse files

Merge commit 'origin/1.3'

parents d570b05b 66a35306
......@@ -1974,7 +1974,15 @@
\o Setting breakpoints in code that is compiled into the binary more
than once does not work.
\endlist
\o On Linux and Windows, Installing Qt with one user account and
then using it with another requires other users to manually set
the Qt version. On Windows, setting the MinGW location is
required as well. The same applies to the location of GDB for Symbian.
A workaround is to copy %APPDATA%/Nokia/qtcreator.ini (Windows) or
$HOME/.config/Nokia/QtCreator.ini (Linux) from the directory
of the user who installed Creator to the other user.
This issues does not exist on Mac OS X.
\endlist
\section1 Known Issues of Version 1.2.0 and 1.2.1
......
......@@ -11067,8 +11067,8 @@ al control de versiones (%2)?</translation>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<translation>Directorio de MinGw:</translation>
<source>MinGW Directory:</source>
<translation>Directorio de MinGW:</translation>
</message>
<message>
<location/>
......
......@@ -10356,7 +10356,7 @@ to version control (%2)?</source>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<source>MinGW Directory:</source>
<translation type="unfinished"></translation>
</message>
<message>
......
......@@ -11037,8 +11037,8 @@ al VCS (%2)?</translation>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<translation>Cartella MinGw:</translation>
<source>MinGW Directory:</source>
<translation>Cartella MinGW:</translation>
</message>
<message>
<location/>
......
......@@ -11041,8 +11041,8 @@ to version control (%2)?</source>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<translation>MinGw ディレクトリ:</translation>
<source>MinGW Directory:</source>
<translation>MinGW ディレクトリ:</translation>
</message>
<message>
<location/>
......
......@@ -2803,7 +2803,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<source>MinGW Directory:</source>
<translation>Katalog MinGW:</translation>
</message>
<message>
......
......@@ -12389,8 +12389,8 @@ to version control (%2)?</source>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<translation>Каталог MinGw:</translation>
<source>MinGW Directory:</source>
<translation>Каталог MinGW:</translation>
</message>
<message>
<location/>
......
......@@ -10770,7 +10770,7 @@ v sistem za nadzor različic (%2)?</translation>
</message>
<message>
<location/>
<source>MinGw Directory:</source>
<source>MinGW Directory:</source>
<translation>Mapa z MinGW:</translation>
</message>
<message>
......
......@@ -147,6 +147,16 @@ void Document::setRevision(unsigned revision)
_revision = revision;
}
QDateTime Document::lastModified() const
{
return _lastModified;
}
void Document::setLastModified(const QDateTime &lastModified)
{
_lastModified = lastModified;
}
QString Document::fileName() const
{
return _fileName;
......@@ -447,6 +457,8 @@ Document::Ptr Snapshot::documentFromSource(const QByteArray &preprocessedCode,
Document::Ptr newDoc = Document::create(fileName);
if (Document::Ptr thisDocument = value(fileName)) {
newDoc->_revision = thisDocument->_revision;
newDoc->_lastModified = thisDocument->_lastModified;
newDoc->_includes = thisDocument->_includes;
newDoc->_definedMacros = thisDocument->_definedMacros;
newDoc->_macroUses = thisDocument->_macroUses;
......
......@@ -40,6 +40,7 @@
#include <QSharedPointer>
#include <QString>
#include <QStringList>
#include <QDateTime>
namespace CPlusPlus {
......@@ -63,6 +64,9 @@ public:
unsigned revision() const;
void setRevision(unsigned revision);
QDateTime lastModified() const;
void setLastModified(const QDateTime &lastModified);
QString fileName() const;
QStringList includedFiles() const;
......@@ -310,6 +314,7 @@ private:
QList<MacroUse> _macroUses;
QList<UndefinedMacroUse> _undefinedMacroUses;
QByteArray _source;
QDateTime _lastModified;
unsigned _revision;
friend class Snapshot;
......
......@@ -81,6 +81,7 @@
#include <QtCore/QTime>
#include <QtCore/QTimer>
#include <QtCore/QStack>
#include <QtCore/QSettings>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QHeaderView>
......@@ -765,8 +766,32 @@ void CPPEditor::renameUsages()
renameUsagesNow();
}
bool CPPEditor::showWarningMessage() const
{
// Restore settings
QSettings *settings = Core::ICore::instance()->settings();
settings->beginGroup(QLatin1String("CppEditor"));
settings->beginGroup(QLatin1String("Rename"));
const bool showWarningMessage = settings->value(QLatin1String("ShowWarningMessage"), true).toBool();
settings->endGroup();
settings->endGroup();
return showWarningMessage;
}
void CPPEditor::setShowWarningMessage(bool showWarningMessage)
{
// Restore settings
QSettings *settings = Core::ICore::instance()->settings();
settings->beginGroup(QLatin1String("CppEditor"));
settings->beginGroup(QLatin1String("Rename"));
settings->setValue(QLatin1String("ShowWarningMessage"), showWarningMessage);
settings->endGroup();
settings->endGroup();
}
void CPPEditor::hideRenameNotification()
{
setShowWarningMessage(false);
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
}
......@@ -774,10 +799,12 @@ void CPPEditor::renameUsagesNow()
{
if (Symbol *canonicalSymbol = markSymbols()) {
if (canonicalSymbol->identifier() != 0) {
Core::EditorManager::instance()->showEditorInfoBar(QLatin1String("CppEditor.Rename"),
tr("This change cannot be undone."),
tr("Yes, I know what I am doing."),
this, SLOT(hideRenameNotification()));
if (showWarningMessage()) {
Core::EditorManager::instance()->showEditorInfoBar(QLatin1String("CppEditor.Rename"),
tr("This change cannot be undone."),
tr("Yes, I know what I am doing."),
this, SLOT(hideRenameNotification()));
}
m_modelManager->renameUsages(canonicalSymbol);
}
......
......@@ -235,6 +235,9 @@ private Q_SLOTS:
void updateSemanticInfo(const SemanticInfo &semanticInfo);
private:
bool showWarningMessage() const;
void setShowWarningMessage(bool showWarningMessage);
CPlusPlus::Symbol *markSymbols();
bool sortedMethodOverview() const;
CPlusPlus::Symbol *findDefinition(CPlusPlus::Symbol *symbol);
......
......@@ -562,6 +562,10 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type,
doc = Document::create(fileName);
doc->setRevision(m_revision);
QFileInfo info(fileName);
if (info.exists())
doc->setLastModified(info.lastModified());
Document::Ptr previousDoc = switchDocument(doc);
const QByteArray preprocessedCode = preprocess(fileName, contents);
......@@ -588,6 +592,26 @@ Document::Ptr CppPreprocessor::switchDocument(Document::Ptr doc)
}
void CppTools::CppModelManagerInterface::updateModifiedSourceFiles()
{
const Snapshot snapshot = this->snapshot();
QStringList sourceFiles;
foreach (const Document::Ptr doc, snapshot) {
const QDateTime lastModified = doc->lastModified();
if (! lastModified.isNull()) {
QFileInfo fileInfo(doc->fileName());
if (fileInfo.exists() && fileInfo.lastModified() != lastModified)
sourceFiles.append(doc->fileName());
}
}
updateSourceFiles(sourceFiles);
}
CppTools::CppModelManagerInterface *CppTools::CppModelManagerInterface::instance()
{
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
......
......@@ -83,9 +83,6 @@ public:
static CppModelManagerInterface *instance();
virtual void GC() = 0;
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
virtual QMap<QString, QString> workingCopy() const = 0;
virtual CPlusPlus::Snapshot snapshot() const = 0;
......@@ -104,6 +101,11 @@ public:
virtual void renameUsages(CPlusPlus::Symbol *symbol) = 0;
virtual void findUsages(CPlusPlus::Symbol *symbol) = 0;
public Q_SLOTS:
void updateModifiedSourceFiles();
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
virtual void GC() = 0;
};
class CPPTOOLS_EXPORT AbstractEditorSupport
......
......@@ -199,8 +199,6 @@ DisassemblerViewAgent::~DisassemblerViewAgent()
d->locationMark = 0;
delete d;
d = 0;
delete d->locationMark;
d->locationMark = 0;
}
void DisassemblerViewAgent::cleanup()
......
......@@ -1113,7 +1113,8 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
setState(InferiorStopping);
} else {
// The user triggered a stop, but meanwhile the app simply exited ...
QTC_ASSERT(state() == InferiorStopping, qDebug() << state());
QTC_ASSERT(state() == InferiorStopping || state() == InferiorStopping_Kill,
qDebug() << state());
}
setState(InferiorStopped);
QString msg;
......
......@@ -75,8 +75,7 @@ StackWindow::StackWindow(DebuggerManager *manager, QWidget *parent)
StackWindow::~StackWindow()
{
// FIXME: leak
//delete m_disassemblerAgent;
delete m_disassemblerAgent;
}
void StackWindow::showAddressColumn(bool on)
......
......@@ -108,7 +108,6 @@ SearchResultWindow::~SearchResultWindow()
void SearchResultWindow::setTextToReplace(const QString &textToReplace)
{
m_replaceTextEdit->setText(textToReplace);
m_replaceTextEdit->selectAll();
}
QString SearchResultWindow::textToReplace() const
......@@ -233,6 +232,7 @@ void SearchResultWindow::setFocus()
|| m_widget->focusWidget() == m_replaceTextEdit
|| m_focusReplaceEdit) {
m_replaceTextEdit->setFocus();
m_replaceTextEdit->selectAll();
} else {
m_searchResultTreeView->setFocus();
}
......
......@@ -73,7 +73,7 @@ BuildSettingsPanel::BuildSettingsPanel(Project *project)
BuildSettingsPanel::~BuildSettingsPanel()
{
delete m_widget;
}
QString BuildSettingsPanel::name() const
......
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