Commit d7dbb27f authored by con's avatar con
Browse files

Merge commit 'origin/1.2'

parents fba1d8d8 f29f2c55
......@@ -13,70 +13,73 @@ adapted accordingly.
General:
* The Welcome Screen has been redesigned.
* There has been some speed improvements: large amounts of persistent data
* There has been some speed improvements: large amounts of persistent data.
(e.g., Qt Locator's cache) is now stored in an SQLite database.
* The window title now displays the current file's name.
Editing
* There is now an option for listing methods alphabetically in the combo box
above the editor.
* A block highlighting feature has been added.
* Code folding markers have been improved on.
* Added an option for listing methods alphabetically in the combo box above
the editor.
* Added a block highlighting feature.
* Improved the code folding markers.
* FakeVim mode has received further improvements.
* It is now possible to disable Ctrl+Click navigation.
* An optional XCode-style tab indentation has been added.
* Optional XCode-style tab indentation has been added.
* Ui changes now propagate immediately to the code model.
* Fixed possibly missing code completion with MinGW toolchain.
* Added option for turning off antialiasing of text editor fonts.
* Added an option for turning off antialiasing of text editor fonts.
* It is now possible to search within the text editor using regular
expressions.
* Added an action to delete a line without copying it.
* Added actions to copy a line up/down (Ctrl+Alt+Up/Down).
Building and Running
* A new option Auto-Save before Build and Run has been added.
* Added option to set environment variables for running
* Fixed bug that prevented use of Qt 4 with version < 4.2
* Added the option to auto-save before building.
* Made auto-build before run optional.
* Added the ability to set environment variables specific for running.
* Fixed a bug that prevented the use of Qt versions < 4.2.
Debugging
* Added Windows Console Debugger support (x86 and AMD64)
* Added command line options to attach to process ids
* Further improved dumpers; do additional memory checking on Windows to
avoid crashes for speedup
* Changed method of dumper loading on Windows, enabling it for MinGW 64
* Make it possible to disable breakpoints
* Make it possible to float the debugger views
* Added support for Windows Console Debugger (x86 and AMD64).
* Added command line options to attach the debugger to process ids.
* Further improved dumpers.
* Changed the way dumpers are loaded on Windows, enabling it for MinGW 64.
* Made it possible to disable breakpoints.
* Made it possible to float the debugger views.
Wizards
* Added a wizard that creates an empty Qt4 project.
Designer
* Added "Qt Designer" (external editor) to "Open With" menus
* Added the external Qt Designer editor to the "Open With" menus.
Version control plugins
* Made submit action raise existing submit editors
* Made svn detection recognize TortoiseSVN using "_svn" as directory
* Fixed perforce configuration checking, made it use the settings correctly
* Made the submit action raise existing submit editors.
* Made SVN detection recognize TortoiseSVN using "_svn" as directory.
* Fixed Perforce configuration checking, ensuring that it used the settings
correctly.
Documentation
* Added tutorial on how to create an application from scratch using Creator
* Added a tutorial on how to create an application from scratch using Qt
Creator.
I18N
* Added infrastructure for translations
* Added German translation
* Added infrastructure for translations.
* Added German translation.
Platform Specific
Windows
* Show native path separators
* Experimental support for the Microsoft C++ compilers from Windows SDKs
or VS 2005/2008 (x86 and AMD64)
* Qt Creator now displays native path separators.
* Added experimental support for the Microsoft C++ compilers from Windows
SDKs or VS 2005/2008 (x86 and AMD64).
Mac
Linux
Other Unixes
* Made Qt Creator less dependant on Linux specific defines
* Made Qt Creator less dependant on Linux specific defines.
Additional credits go to:
* axasia <axasia@gmail.com> (japanese translation, compile fixes)
......
......@@ -46,8 +46,6 @@
\nextpage {examples/addressbook-sdk/part1}{Chapter 1}
\title Address Book Tutorial
\ingroup howto
\ingroup tutorials
\brief An introduction to GUI programming with Qt and Qt Creator,
describing in detail how to put together a simple yet fully-
functioning application.
......@@ -93,6 +91,12 @@
recommend checking out the \l{mainwindows/application}{Application}
example, which presents a small GUI application, with menus, toolbars, a
status bar, and so on.
\table
\o \bold{Disclaimer}: Development of this tutorial is on-going.
Currently, we have three parts complete. The remaining four parts
will be available in the coming release.
\endtable
*/
......@@ -207,9 +211,9 @@
\snippet examples/addressbook-sdk/part1/main.cpp main function
The code constructs a new \c AddressBook widget on the heap using the
\c new keyword and invokes its \l{QWidget::}{show()} function to display
it. However, the widget will not be shown until the application's event
The code constructs a new \c AddressBook widget on the stack and
invokes its \l{QWidget::}{show()} function to display it.
However, the widget will not be shown until the application's event
loop is started. This is done by calling the application's
\l{QApplication::}{exec()} function. Finally, the result returned by
\l{QApplication::}{exec()} is used as the \c main() function's return
......@@ -532,7 +536,7 @@
\c contacts and then:
\list
\o If the iterator is at teh end of \c contacts, we clear the display
\o If the iterator is at the end of \c contacts, we clear the display
and return.
\o If the iterator is at the beginning of \c contacts, we move it to
the end.
......@@ -543,9 +547,17 @@
Again, we display the contents of the current object in \c contacts.
\table
\o \bold{Note}: This tutorial is work in progress and currently ends here.
You can read the remaining four chapters of the Address Book Tutorial from
\l{http://doc.trolltech.com/latest/tutorials-addressbook.html}{the Qt library documentation}
instead. Note that this version is IDE agnostic and does not
consider Qt Creator. It might contain subtle differences.
\endtable
*/
/*!
\omit
\page tutorials-addressbook-sdk-part4.html
\previouspage Address Book 3 - Navigating between Entries
\contentspage {Address Book Tutorial}{Contents}
......@@ -704,9 +716,7 @@
\snippet examples/addressbook-sdk/part4/addressbook.cpp addContact
\dots
\snippet examples/addressbook-sdk/part4/addressbook.cpp cancel
*/
/*!
\page tutorials-addressbook-sdk-part5.html
\previouspage Address Book 4 - Editing and Removing Addresses
\contentspage {Address Book Tutorial}{Contents}
......@@ -745,9 +755,7 @@
in a horizontal layout. Then set a top level layout - either horizontal or
vertical.
*/
/*!
\page tutorials-addressbook-sdk-part6.html
\previouspage Address Book 5 - Adding a Find Function
\contentspage {Address Book Tutorial}{Contents}
......@@ -755,13 +763,12 @@
\example examples/addressbook-sdk/part6
\title Address Book 6 - Loading and Saving
*/
/*!
\page tutorials-addressbook-sdk-part7.html
\previouspage Address Book 6 - Loading and Saving
\contentspage {Address Book Tutorial}{Contents}
\example examples/addressbook-sdk/part7
\title Address Book 7 - Additional Features
\endomit
*/
......@@ -1723,7 +1723,16 @@
\list
\o Gdb on Windows may not work if the 'Embassy \reg Security Center' software
by 'Wave \reg Systems' is installed and active (causing crashes in \c{vxvault.dll)}).
\o Only simple data types (POD) work in the Watch Window of CDB.
\o Qt Creator uses SQLite for storing some of its settings. SQLite is
known to have problems with certain NFS servers (most notably the
nfs-user-server 2.2beta), since they can lock up the application
when it tries to lock the database. If your home directory is on an
NFS share and you encounter this issue, one option would be to
switch to the nfs-kernel-server, or create a symlink so that the
settings are stored locally.
\endlist
\section1 Known Issues of Version 1.1.0
......
......@@ -72,12 +72,6 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
m_insideFileChanged(false)
{
m_file = new CMakeFile(this, fileName);
m_watcher = new ProjectExplorer::FileWatcher(this);
connect(m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(fileChanged(QString)));
m_watcher->addFile(fileName);
connect(this, SIGNAL(activeBuildConfigurationChanged()),
this, SLOT(slotActiveBuildConfiguration()));
}
CMakeProject::~CMakeProject()
......@@ -567,7 +561,6 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
insertBuildStep(0, makeStep);
addBuildConfiguration("all");
setActiveBuildConfiguration("all");
makeStep->setBuildTarget("all", "all", true);
if (!copw.buildDirectory().isEmpty())
setValue("all", "buildDirectory", copw.buildDirectory());
......@@ -576,6 +569,8 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
MakeStep *cleanMakeStep = new MakeStep(this);
insertCleanStep(0, cleanMakeStep);
cleanMakeStep->setValue("clean", true);
setActiveBuildConfiguration("all");
} else {
// We have a user file, but we could still be missing the cbp file
// or simply run createXml with the saved settings
......@@ -600,8 +595,14 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
copw.exec();
}
}
parseCMakeLists(); // Gets the directory from the active buildconfiguration
m_watcher = new ProjectExplorer::FileWatcher(this);
connect(m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(fileChanged(QString)));
m_watcher->addFile(m_fileName);
connect(this, SIGNAL(activeBuildConfigurationChanged()),
this, SLOT(slotActiveBuildConfiguration()));
}
CMakeTarget CMakeProject::targetForTitle(const QString &title)
......
......@@ -350,6 +350,7 @@ bool CdbDumperHelper::ensureInitialized(QString *errorMessage)
*errorMessage = msgLoadFailed(m_library, false, *errorMessage);
m_access->showDebuggerOutput(m_messagePrefix, *errorMessage);
m_access->showQtDumperLibraryWarning(*errorMessage);
m_state = Disabled; // No message here, no point in retrying
return false;
case CallLoadNoQtApp:
m_access->showDebuggerOutput(m_messagePrefix, QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "The debuggee does not appear to be Qt application."));
......
......@@ -40,7 +40,8 @@ enum { debugExc = 0 };
// Special exception codes.
enum { cppExceptionCode = 0xe06d7363, startupCompleteTrap = 0x406d1388,
rpcServerUnavailableExceptionCode = 0x6ba };
rpcServerUnavailableExceptionCode = 0x6ba,
dllNotFoundExceptionCode = 0xc0000135 };
namespace Debugger {
namespace Internal {
......@@ -168,6 +169,9 @@ void formatException(const EXCEPTION_RECORD64 *e, QTextStream &str)
case startupCompleteTrap:
str << "Startup complete";
break;
case dllNotFoundExceptionCode:
str << "DLL not found";
break;
case EXCEPTION_ACCESS_VIOLATION: {
const bool writeOperation = e->ExceptionInformation[0];
str << (writeOperation ? "write" : "read")
......@@ -266,6 +270,7 @@ bool isFatalException(LONG code)
case EXCEPTION_SINGLE_STEP:
case startupCompleteTrap: // Mysterious exception at start of application
case rpcServerUnavailableExceptionCode:
case dllNotFoundExceptionCode:
return false;
default:
break;
......
......@@ -68,10 +68,11 @@ static inline QString wCharToQString(const WCHAR *w) { return QString::fromUtf16
#endif
enum Mode { HelpMode, InstallMode, UninstallMode, PromptMode, ForceCreatorMode, ForceDefaultMode };
enum Mode { HelpMode, RegisterMode, UnregisterMode, PromptMode, ForceCreatorMode, ForceDefaultMode };
Mode optMode = PromptMode;
bool optIsWow = false;
bool noguiMode = false;
unsigned long argProcessId = 0;
quint64 argWinCrashEvent = 0;
......@@ -113,12 +114,14 @@ static bool parseArguments(const QStringList &args, QString *errorMessage)
optMode = ForceCreatorMode;
} else if (arg == QLatin1String("default")) {
optMode = ForceDefaultMode;
} else if (arg == QLatin1String("install")) {
optMode = InstallMode;
} else if (arg == QLatin1String("uninstall")) {
optMode = UninstallMode;
} else if (arg == QLatin1String("register")) {
optMode = RegisterMode;
} else if (arg == QLatin1String("unregister")) {
optMode = UnregisterMode;
} else if (arg == QLatin1String("wow")) {
optIsWow = true;
} else if (arg == QLatin1String("nogui")) {
noguiMode = true;
} else {
*errorMessage = QString::fromLatin1("Unexpected option: %1").arg(arg);
return false;
......@@ -141,8 +144,8 @@ static bool parseArguments(const QStringList &args, QString *errorMessage)
}
switch (optMode) {
case HelpMode:
case InstallMode:
case UninstallMode:
case RegisterMode:
case UnregisterMode:
break;
default:
if (argProcessId == 0) {
......@@ -166,13 +169,14 @@ static void usage(const QString &binary, const QString &message = QString())
str << "<b>" << message << "</b>";
}
str << "<pre>"
<< "Usage: " << QFileInfo(binary).baseName() << "[-wow] [-help|-?|qtcreator|default|install|uninstall] &lt;process-id> &lt;event-id>\n"
<< "Usage: " << QFileInfo(binary).baseName() << "[-wow] [-help|-?|qtcreator|default|register|unregister] &lt;process-id> &lt;event-id>\n"
<< "Options: -help, -? Display this help\n"
<< " -qtcreator Launch Qt Creator without prompting\n"
<< " -default Launch Default handler without prompting\n"
<< " -install Install itself (requires administrative privileges)\n"
<< " -uninstall Uninstall itself (requires administrative privileges)\n"
<< " -register Register as post mortem debugger (requires administrative privileges)\n"
<< " -unregister Unregister as post mortem debugger (requires administrative privileges)\n"
<< " -wow Indicates Wow32 call\n"
<< " -nogui Do not show error messages in popup windows\n"
<< "</pre>"
<< "<p>To install, modify the registry key <i>HKEY_LOCAL_MACHINE\\" << wCharToQString(debuggerRegistryKeyC)
<< "</i>:</p><ul>"
......@@ -339,9 +343,9 @@ static QString getProcessBaseName(DWORD pid)
// ------- main modes
bool startCreatorAsDebugger(const QApplication &a, QString *errorMessage)
bool startCreatorAsDebugger(QString *errorMessage)
{
const QString dir = a.applicationDirPath();
const QString dir = QApplication::applicationDirPath();
const QString binary = dir + QLatin1String("/qtcreator.exe");
QStringList args;
args << QLatin1String("-debug") << QString::number(argProcessId)
......@@ -359,7 +363,7 @@ bool startCreatorAsDebugger(const QApplication &a, QString *errorMessage)
return true;
}
bool startDefaultDebugger(const QApplication & /*a*/, QString *errorMessage)
bool startDefaultDebugger(QString *errorMessage)
{
// Read out default value
HKEY handle;
......@@ -395,7 +399,7 @@ bool startDefaultDebugger(const QApplication & /*a*/, QString *errorMessage)
return true;
}
bool chooseDebugger(const QApplication &a, QString *errorMessage)
bool chooseDebugger(QString *errorMessage)
{
const QString msg = QString::fromLatin1("The application \"%1\" (process id %2) crashed. Would you like to debug it?").arg(getProcessBaseName(argProcessId)).arg(argProcessId);
QMessageBox msgBox(QMessageBox::Information, QLatin1String(titleC), msg, QMessageBox::Cancel);
......@@ -404,30 +408,30 @@ bool chooseDebugger(const QApplication &a, QString *errorMessage)
msgBox.exec();
if (msgBox.clickedButton() == creatorButton) {
// Just in case, default to standard
if (startCreatorAsDebugger(a, errorMessage))
if (startCreatorAsDebugger(errorMessage))
return true;
return startDefaultDebugger(a, errorMessage);
return startDefaultDebugger(errorMessage);
}
if (msgBox.clickedButton() == defaultButton)
return startDefaultDebugger(a, errorMessage);
return startDefaultDebugger(errorMessage);
return true;
}
// Installation helpers: Format the debugger call with placeholders for PID and event
// '"[path]\qtcdebugger" [-wow] %ld %ld'.
static QString debuggerCall(const QApplication &a, const QString &additionalOption = QString())
static QString debuggerCall(const QString &additionalOption = QString())
{
QString rc;
QTextStream str(&rc);
str << '"' << QDir::toNativeSeparators(a.applicationFilePath()) << '"';
str << '"' << QDir::toNativeSeparators(QApplication::applicationFilePath()) << '"';
if (!additionalOption.isEmpty())
str << ' ' << additionalOption;
str << " %ld %ld";
return rc;
}
// Installation helper: Register ourselves in a debugger registry key.
// registration helper: Register ourselves in a debugger registry key.
// Make a copy of the old value as "Debugger.Default" and have the
// "Debug" key point to us.
......@@ -444,7 +448,7 @@ static bool registerDebuggerKey(const WCHAR *key,
if (!registryReadStringKey(handle, debuggerRegistryValueNameC, &oldDebugger, errorMessage))
break;
if (oldDebugger.contains(QLatin1String(applicationFileC), Qt::CaseInsensitive)) {
*errorMessage = QLatin1String("The program is already installed.");
*errorMessage = QLatin1String("The program is already registered as post mortem debugger.");
return false;
}
if (!registryWriteStringKey(handle, debuggerRegistryDefaultValueNameC, oldDebugger, errorMessage))
......@@ -460,18 +464,18 @@ static bool registerDebuggerKey(const WCHAR *key,
return success;
}
bool install(const QApplication &a, QString *errorMessage)
bool install(QString *errorMessage)
{
if (!registerDebuggerKey(debuggerRegistryKeyC, debuggerCall(a), errorMessage))
if (!registerDebuggerKey(debuggerRegistryKeyC, debuggerCall(), errorMessage))
return false;
#ifdef Q_OS_WIN64
if (!registerDebuggerKey(debuggerWow32RegistryKeyC, debuggerCall(a, QLatin1String("-wow")), errorMessage))
if (!registerDebuggerKey(debuggerWow32RegistryKeyC, debuggerCall(QLatin1String("-wow")), errorMessage))
return false;
#endif
return true;
}
// Uninstall helper: Restore the original debugger key
// Unregister helper: Restore the original debugger key
static bool unregisterDebuggerKey(const WCHAR *key, QString *errorMessage)
{
HKEY handle = 0;
......@@ -494,7 +498,7 @@ static bool unregisterDebuggerKey(const WCHAR *key, QString *errorMessage)
}
bool uninstall(const QApplication & /*a*/, QString *errorMessage)
bool uninstall(QString *errorMessage)
{
if (!unregisterDebuggerKey(debuggerRegistryKeyC, errorMessage))
return false;
......@@ -509,11 +513,11 @@ bool uninstall(const QApplication & /*a*/, QString *errorMessage)
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName(QLatin1String(titleC));
a.setOrganizationName(QLatin1String(organizationC));
QApplication::setApplicationName(QLatin1String(titleC));
QApplication::setOrganizationName(QLatin1String(organizationC));
QString errorMessage;
if (!parseArguments(a.arguments(), &errorMessage)) {
if (!parseArguments(QApplication::arguments(), &errorMessage)) {
qWarning("%s\n", qPrintable(errorMessage));
usage(QCoreApplication::applicationFilePath(), errorMessage);
return -1;
......@@ -526,24 +530,26 @@ int main(int argc, char *argv[])
usage(QCoreApplication::applicationFilePath(), errorMessage);
break;
case ForceCreatorMode:
ex = startCreatorAsDebugger(a, &errorMessage) ? 0 : -1;
ex = startCreatorAsDebugger(&errorMessage) ? 0 : -1;
break;
case ForceDefaultMode:
ex = startDefaultDebugger(a, &errorMessage) ? 0 : -1;
ex = startDefaultDebugger(&errorMessage) ? 0 : -1;
break;
case PromptMode:
ex = chooseDebugger(a, &errorMessage) ? 0 : -1;
ex = chooseDebugger(&errorMessage) ? 0 : -1;
break;
case InstallMode:
ex = install(a, &errorMessage) ? 0 : -1;
case RegisterMode:
ex = install(&errorMessage) ? 0 : -1;
break;
case UninstallMode:
ex = uninstall(a, &errorMessage) ? 0 : -1;
case UnregisterMode:
ex = uninstall(&errorMessage) ? 0 : -1;
break;
}
if (ex && !errorMessage.isEmpty()) {
qWarning("%s\n", qPrintable(errorMessage));
QMessageBox::warning(0, QLatin1String(titleC), errorMessage, QMessageBox::Ok);
if (noguiMode)
qWarning("%s\n", qPrintable(errorMessage));
else
QMessageBox::warning(0, QLatin1String(titleC), errorMessage, QMessageBox::Ok);
}
return ex;
}
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