From: <da...@us...> - 2006-04-05 09:05:25
|
Revision: 2040 Author: dandfra Date: 2006-04-05 02:05:03 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/tora/?rev=2040&view=rev Log Message: ----------- It Compiles on Windows, readded lost patch Modified Paths: -------------- trunk/tora/Makefile.mingw trunk/tora/NEWS trunk/tora/src/toconfiguration.cpp trunk/tora/src/utils.cpp Modified: trunk/tora/Makefile.mingw =================================================================== --- trunk/tora/Makefile.mingw 2006-04-04 19:21:49 UTC (rev 2039) +++ trunk/tora/Makefile.mingw 2006-04-05 09:05:03 UTC (rev 2040) @@ -61,7 +61,7 @@ # Additional includes needed to compile program INCLUDES="-I$(OCI_HOME)/include" \ "-I$(QTDIR)/include" \ - "-I$(OTL_DIR)" + "-I$(OTL_DIR)" \ "-I$(LOKI_DIR)" # C++ Compiler to use Modified: trunk/tora/NEWS =================================================================== --- trunk/tora/NEWS 2006-04-04 19:21:49 UTC (rev 2039) +++ trunk/tora/NEWS 2006-04-05 09:05:03 UTC (rev 2040) @@ -14,6 +14,7 @@ 2006-03-18: Reverted patch #1438322: it hangs tora PL/SQL Debugger 2006-03-18: Fixed autocompletion on Linux 2006-03-20: Linux autocompletion works on Windows too. Remove the ifdef +2006-04-05: Fixed compilation on windows. Re-added missing patch from Michael Meskes 1.3.21: Modified: trunk/tora/src/toconfiguration.cpp =================================================================== --- trunk/tora/src/toconfiguration.cpp 2006-04-04 19:21:49 UTC (rev 2039) +++ trunk/tora/src/toconfiguration.cpp 2006-04-05 09:05:03 UTC (rev 2040) @@ -4,8 +4,50 @@ #include <qregexp.h> #include "utils.h" +#ifdef WIN32 +#include "windows/cregistry.h" +#endif +#ifdef WIN32 +# ifdef TOAD +# define APPLICATION_NAME "SOFTWARE\\Quest Software\\Toad for MySQL\\" +# else +# define APPLICATION_NAME "SOFTWARE\\Quest Software\\tora\\" +# define FALLBACK_NAME "SOFTWARE\\Underscore\\tora\\" +# endif +static char *toKeyPath(const QString &str, CRegistry ®istry) +{ + static char *buf = NULL; + int pos = str.length() - 1; + while (pos >= 0 && str.at(pos) != '\\') + pos--; + if (pos < 0) + throw QT_TRANSLATE_NOOP("toKeyPath", "Couldn't find \\ in path"); + QString ret = str.mid(0, pos); + if (buf) + free(buf); + buf = strdup(ret); + registry.CreateKey(HKEY_CURRENT_USER, buf); + return buf; +} + +static char *toKeyValue(const QString &str) +{ + static char *buf = NULL; + int pos = str.length() - 1; + while (pos >= 0 && str.at(pos) != '\\') + pos--; + if (pos < 0) + throw QT_TRANSLATE_NOOP("toKeyValue", "Couldn't find \\ in path"); + if (buf) + free(buf); + buf = strdup(str.mid(pos + 1)); + return buf; +} + +#endif + toConfiguration::toConfiguration() { @@ -251,47 +293,8 @@ return (*i).second; } -#ifdef WIN32 -# ifdef TOAD -# define APPLICATION_NAME "SOFTWARE\\Quest Software\\Toad for MySQL\\" -# else -# define APPLICATION_NAME "SOFTWARE\\Quest Software\\tora\\" -# define FALLBACK_NAME "SOFTWARE\\Underscore\\tora\\" -# endif -static char *toKeyPath(const QString &str, CRegistry ®istry) -{ - static char *buf = NULL; - int pos = str.length() - 1; - while (pos >= 0 && str.at(pos) != '\\') - pos--; - if (pos < 0) - throw QT_TRANSLATE_NOOP("toKeyPath", "Couldn't find \\ in path"); - QString ret = str.mid(0, pos); - if (buf) - free(buf); - buf = strdup(ret); - registry.CreateKey(HKEY_CURRENT_USER, buf); - return buf; -} -static char *toKeyValue(const QString &str) -{ - static char *buf = NULL; - int pos = str.length() - 1; - while (pos >= 0 && str.at(pos) != '\\') - pos--; - if (pos < 0) - throw QT_TRANSLATE_NOOP("toKeyValue", "Couldn't find \\ in path"); - if (buf) - free(buf); - buf = strdup(str.mid(pos + 1)); - return buf; -} - -#endif - - const QString& toConfiguration::config(const QCString &tag, const QCString &def, const QCString &name) { QCString str = name; Modified: trunk/tora/src/utils.cpp =================================================================== --- trunk/tora/src/utils.cpp 2006-04-04 19:21:49 UTC (rev 2039) +++ trunk/tora/src/utils.cpp 2006-04-05 09:05:03 UTC (rev 2040) @@ -325,12 +325,13 @@ toMain *main = dynamic_cast<toMain *>(qApp->mainWidget()); if (main) { + if(!str.isEmpty()){ int sec = toConfigurationSingle::Instance().globalConfig(CONF_STATUS_MESSAGE, DEFAULT_STATUS_MESSAGE).toInt(); if (save || sec == 0) main->statusBar()->message(str.simplifyWhiteSpace()); else main->statusBar()->message(str.simplifyWhiteSpace(), sec*1000); - if (!save && !str.isEmpty() && log) + if (!save && log) { if (toConfigurationSingle::Instance().globalConfig(CONF_MESSAGE_STATUSBAR, "").isEmpty()) main->displayMessage(str); @@ -341,6 +342,7 @@ } QToolTip::add (main->statusBar(), str); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |