Commit 85f876bb authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

merge master@f8d4dbf

parents 793d3ae0 f8d4dbf7
......@@ -7,7 +7,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(KDE4_BUILD_TESTS ON) # for unit tests
set(VERSION_MAJOR "2")
set(VERSION_MINOR "12")
set(VERSION_MINOR "13")
set(VERSION_PATCH "99")
# set default umbrello version
......@@ -35,6 +35,9 @@ find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
message(STATUS "Using automoc4 version ${AUTOMOC4_VERSION}")
message(STATUS "Using cmake version ${CMAKE_VERSION}")
# The FindKDE4.cmake module sets _KDE4_PLATFORM_DEFINITIONS with
# definitions like _GNU_SOURCE that are needed on each platform.
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} -DQT_STRICT_ITERATORS)
......
......@@ -272,10 +272,8 @@ representation on the diagram.
</para>
<para>
For most &UML; elements you can also open the properties dialog by
double clicking on it if you are using the selection tool (arrow). The
exception to this is Associations, in which case a double click
creates an anchor point. For associations you need to use the &RMB; context menu to get the properties dialog.
For &UML; elements you can also open the properties dialog by
double clicking on it if you are using the selection tool (arrow).
</para>
<para>
......
......@@ -13,7 +13,10 @@
***************************************************************************/
#include "cachemanager.h"
#include <kdebug.h>
#include "debug_utils.h"
DEBUG_REGISTER_DISABLED(CacheManager)
void CacheNode::access() const
{
......@@ -76,14 +79,14 @@ void CacheManager::increaseFrame()
{
m_currentFrame ++;
if (m_set.size() > m_maxNodes) {
//kdDebug(9007) << "CacheManager: Have " << m_set.size() << " nodes, maximum is " << m_maxNodes << ", erasing." << endl;
DEBUG("CacheManager") << "Have " << m_set.size() << " nodes, maximum is " << m_maxNodes << ", erasing." << endl;
int mustErase = m_set.size() - m_maxNodes;
while (!m_set.empty() && mustErase != 0) {
--mustErase;
SetType::iterator it = m_set.begin();
erase(*it);
}
//kdDebug(9007) << "CacheManager: Have " << m_set.size() << " nodes after erasing." << endl;
DEBUG("CacheManager") << "Have " << m_set.size() << " nodes after erasing." << endl;
}
}
......
......@@ -23,7 +23,7 @@
#include "driver.h"
#include "lexer.h"
#include "parser.h"
#include <kdebug.h>
#include <klocale.h>
#include <stdlib.h>
#include <qfile.h>
......@@ -35,6 +35,7 @@
#include <iostream>
DEBUG_REGISTER_DISABLED(Driver)
// void Macro::read(QDataStream& stream) {
// stream >> m_idHashValid;
......@@ -316,7 +317,7 @@ public:
m_lex.setReportMessages(reportMessages);
//kdDebug(9007) << "lexing file " << fileName << endl;
DEBUG("Driver") << "lexing file " << fileName << endl;
m_lex.setSource(m_driver->sourceProvider() ->contents(fileName));
if (m_previousCachedLexedFile)
m_previousCachedLexedFile->merge(*m_driver->m_currentLexerCache);
......@@ -433,7 +434,7 @@ void Driver::addDependence(const QString & fileName, const Dependence & dep)
IntIncreaser i(m_dependenceDepth);
if (m_dependenceDepth > m_maxDependenceDepth) {
//kdDebug(9007) << "maximum dependence-depth of " << m_maxDependenceDepth << " was reached, " << fileName << " will not be processed" << endl;
DEBUG("Driver") << "maximum dependence-depth of " << m_maxDependenceDepth << " was reached, " << fileName << " will not be processed" << endl;
return;
}
......@@ -465,7 +466,7 @@ void Driver::addProblem(const QString & fileName, const Problem & problem)
if (m_currentLexerCache)
m_currentLexerCache->addProblem(p);
else
findOrInsertProblemList(m_currentMasterFileName).append(problem);
findOrInsertProblemList(m_currentMasterFileName).append(p);
}
QMap< QString, Dependence >& Driver::findOrInsertDependenceList(const QString & fileName)
......@@ -638,15 +639,6 @@ void Driver::setupLexer(Lexer * lexer)
// qt
lexer->addSkipWord("Q_OBJECT");
lexer->addSkipWord("Q_OVERRIDE", SkipWordAndArguments);
lexer->addSkipWord("Q_ENUMS", SkipWordAndArguments);
lexer->addSkipWord("Q_PROPERTY", SkipWordAndArguments);
lexer->addSkipWord("Q_CLASSINFO", SkipWordAndArguments);
lexer->addSkipWord("Q_SETS", SkipWordAndArguments);
lexer->addSkipWord("Q_UNUSED", SkipWordAndArguments);
lexer->addSkipWord("Q_CREATE_INSTANCE", SkipWordAndArguments);
lexer->addSkipWord("Q_DUMMY_COMPARISON_OPERATOR", SkipWordAndArguments);
lexer->addSkipWord("ACTIVATE_SIGNAL_WITH_PARAM", SkipWordAndArguments);
lexer->addSkipWord("Q_INLINE_TEMPLATES");
lexer->addSkipWord("Q_TEMPLATE_EXTERN");
lexer->addSkipWord("Q_TYPENAME");
......@@ -657,12 +649,114 @@ void Driver::setupLexer(Lexer * lexer)
lexer->addSkipWord("QT_STATIC_CONST_IMPL");
lexer->addSkipWord("QT_WIN_PAINTER_MEMBERS");
lexer->addSkipWord("QT_NC_MSGBOX");
lexer->addSkipWord("Q_VARIANT_AS", SkipWordAndArguments);
lexer->addSkipWord("CALLBACK_CALL_TYPE");
// qt4 [erbsland]
lexer->addSkipWord("ACTIVATE_SIGNAL_WITH_PARAM", SkipWordAndArguments);
lexer->addSkipWord("Q_ALIGNOF", SkipWordAndArguments);
lexer->addSkipWord("Q_ARG", SkipWordAndArguments);
lexer->addSkipWord("Q_ASSERT", SkipWordAndArguments);
lexer->addSkipWord("Q_ASSERT_X", SkipWordAndArguments);
lexer->addSkipWord("Q_BASIC_ATOMIC_INITIALIZER", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_INVALID_SOCKETLAYER", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_NOT_STATE", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_PTR", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_SOCKETENGINE", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_STATE", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_STATES", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_TYPE", SkipWordAndArguments);
lexer->addSkipWord("Q_CHECK_VALID_SOCKETLAYER", SkipWordAndArguments);
lexer->addSkipWord("Q_CLASSINFO", SkipWordAndArguments);
lexer->addSkipWord("Q_CLEANUP_RESOURCE", SkipWordAndArguments);
lexer->addSkipWord("Q_COMPLEX_TYPE", SkipWordAndArguments);
lexer->addSkipWord("Q_CONSTRUCTOR_FUNCTION", SkipWordAndArguments);
lexer->addSkipWord("Q_CONSTRUCTOR_FUNCTION0", SkipWordAndArguments);
lexer->addSkipWord("Q_D", SkipWordAndArguments);
lexer->addSkipWord("Q_DECL_ALIGN", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_ASSOCIATIVE_ITERATOR", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_BUILTIN_METATYPE", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_EXTENSION_INTERFACE", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_FLAGS", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_INCOMPATIBLE_FLAGS", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_INTERFACE", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_METATYPE", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_OPERATORS_FOR_FLAGS", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_PRIVATE", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_PRIVATE_D", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_PUBLIC", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_SEQUENTIAL_ITERATOR", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_SHARED", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_SHARED_STL", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_TR_FUNCTIONS", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_TYPEINFO", SkipWordAndArguments);
lexer->addSkipWord("Q_DECLARE_TYPEINFO_BODY", SkipWordAndArguments);
lexer->addSkipWord("Q_DECL_METATYPE_HELPER", SkipWordAndArguments);
lexer->addSkipWord("Q_DESTRUCTOR_FUNCTION", SkipWordAndArguments);
lexer->addSkipWord("Q_DESTRUCTOR_FUNCTION0", SkipWordAndArguments);
lexer->addSkipWord("Q_DF", SkipWordAndArguments);
lexer->addSkipWord("Q_DISABLE_COPY", SkipWordAndArguments);
lexer->addSkipWord("Q_DUMMY_COMPARISON_OPERATOR", SkipWordAndArguments);
lexer->addSkipWord("Q_ENUMS", SkipWordAndArguments);
lexer->addSkipWord("Q_EXPORT_PLUGIN", SkipWordAndArguments);
lexer->addSkipWord("Q_EXPORT_PLUGIN2", SkipWordAndArguments);
lexer->addSkipWord("Q_EXPORT_STATIC_PLUGIN", SkipWordAndArguments);
lexer->addSkipWord("Q_EXPORT_STATIC_PLUGIN2", SkipWordAndArguments);
lexer->addSkipWord("Q_FLAGS", SkipWordAndArguments);
lexer->addSkipWord("Q_FOREACH", SkipWordAndArguments);
lexer->addSkipWord("Q_FT_GLYPHSLOT_EMBOLDEN", SkipWordAndArguments);
lexer->addSkipWord("Q_FUNC_INFO", SkipWordAndArguments);
lexer->addSkipWord("Q_GLOBAL_STATIC", SkipWordAndArguments);
lexer->addSkipWord("Q_GLOBAL_STATIC_INIT", SkipWordAndArguments);
lexer->addSkipWord("Q_GLOBAL_STATIC_WITH_ARGS", SkipWordAndArguments);
lexer->addSkipWord("Q_GLOBAL_STATIC_WITH_INITIALIZER", SkipWordAndArguments);
lexer->addSkipWord("Q_GTK_IS_WIDGET", SkipWordAndArguments);
lexer->addSkipWord("Q_HASH_DECLARE_INT_NODES", SkipWordAndArguments);
lexer->addSkipWord("Q_IMPL_METATYPE_HELPER", SkipWordAndArguments);
lexer->addSkipWord("Q_IMPORT_PLUGIN", SkipWordAndArguments);
lexer->addSkipWord("Q_IN", SkipWordAndArguments);
lexer->addSkipWord("Q_INFINITY", SkipWordAndArguments);
lexer->addSkipWord("Q_INIT_CHECK", SkipWordAndArguments);
lexer->addSkipWord("Q_INIT_RESOURCE", SkipWordAndArguments);
lexer->addSkipWord("Q_INIT_RESOURCE_EXTERN", SkipWordAndArguments);
lexer->addSkipWord("Q_INT64_C", SkipWordAndArguments);
lexer->addSkipWord("Q_INTERFACES", SkipWordAndArguments);
lexer->addSkipWord("Q_LIKELY", SkipWordAndArguments);
lexer->addSkipWord("Q_MAX_3", SkipWordAndArguments);
lexer->addSkipWord("Q_MAXINT", SkipWordAndArguments);
lexer->addSkipWord("Q_MIN_3", SkipWordAndArguments);
lexer->addSkipWord("Q_MM", SkipWordAndArguments);
lexer->addSkipWord("Q_NEAR_CLIP", SkipWordAndArguments);
lexer->addSkipWord("Q_NONE", SkipWordAndArguments);
lexer->addSkipWord("Q_OVERRIDE", SkipWordAndArguments);
lexer->addSkipWord("Q_PID", SkipWordAndArguments);
lexer->addSkipWord("Q_PLUGIN_INSTANCE", SkipWordAndArguments);
lexer->addSkipWord("Q_PRIVATE_PROPERTY", SkipWordAndArguments);
lexer->addSkipWord("Q_PRIVATE_SLOT", SkipWordAndArguments);
lexer->addSkipWord("Q_PROPERTY", SkipWordAndArguments);
lexer->addSkipWord("Q_Q", SkipWordAndArguments);
lexer->addSkipWord("Q_QNAN", SkipWordAndArguments);
lexer->addSkipWord("Q_REGISTER_METATYPE", SkipWordAndArguments);
lexer->addSkipWord("Q_RETURN_ARG", SkipWordAndArguments);
lexer->addSkipWord("Q_REVISION", SkipWordAndArguments);
lexer->addSkipWord("Q_SCRIPT_DECLARE_QMETAOBJECT", SkipWordAndArguments);
lexer->addSkipWord("Q_SETS", SkipWordAndArguments);
lexer->addSkipWord("Q_SNAN", SkipWordAndArguments);
lexer->addSkipWord("Q_TOOL_BASE", SkipWordAndArguments);
lexer->addSkipWord("Q_TR", SkipWordAndArguments);
lexer->addSkipWord("Q_TYPEID", SkipWordAndArguments);
lexer->addSkipWord("Q_TYPEOF", SkipWordAndArguments);
lexer->addSkipWord("Q_UINT64_C", SkipWordAndArguments);
lexer->addSkipWord("Q_UNLIKELY", SkipWordAndArguments);
lexer->addSkipWord("Q_UNREACHABLE", SkipWordAndArguments);
lexer->addSkipWord("Q_UNSET", SkipWordAndArguments);
lexer->addSkipWord("Q_UNUSED", SkipWordAndArguments);
lexer->addSkipWord("Q_VARIANT_AS", SkipWordAndArguments);
lexer->addSkipWord("QT_MODULE", SkipWordAndArguments);
lexer->addSkipWord("QT_BEGIN_HEADER");
lexer->addSkipWord("QT_BEGIN_NAMESPACE");
lexer->addSkipWord("QT_END_HEADER");
lexer->addSkipWord("QT_END_NAMESPACE");
// flex
lexer->addSkipWord("yyconst");
......
......@@ -20,6 +20,26 @@
#include "errors.h"
#include <klocale.h>
QT_STATIC_CONST_IMPL Error& Errors::InternalError = Error(1, -1, i18n("Internal Error"));
QT_STATIC_CONST_IMPL Error& Errors::SyntaxError = Error(2, -1, i18n("Syntax Error before '%1'"));
QT_STATIC_CONST_IMPL Error& Errors::ParseError = Error(3, -1, i18n("Parse Error before '%1'"));
Error& Errors::_InternalError()
{
static Error *error = 0;
if (error == 0)
error = new Error(1, -1, i18n("Internal Error"));
return *error;
}
Error &Errors::_SyntaxError()
{
static Error *error = 0;
if (error == 0)
error = new Error(2, -1, i18n("Syntax Error before '%1'"));
return *error;
}
Error &Errors::_ParseError()
{
static Error *error = 0;
if (error == 0)
error = new Error(3, -1, i18n("Parse Error before '%1'"));
return *error;
}
......@@ -36,11 +36,14 @@ struct Error {
class Errors
{
public:
QT_STATIC_CONST Error& InternalError;
QT_STATIC_CONST Error& SyntaxError;
QT_STATIC_CONST Error& ParseError;
static Error& _InternalError();
static Error& _SyntaxError();
static Error& _ParseError();
};
#define InternalError _InternalError()
#define SyntaxError _SyntaxError()
#define ParseError _ParseError()
#endif
......@@ -20,7 +20,6 @@
#include "lexer.h"
#include "lookup.h"
#include <kdebug.h>
#include <klocale.h>
#include <qregexp.h>
......
......@@ -13,14 +13,18 @@
***************************************************************************/
#include "lexercache.h"
#include "debug_utils.h"
#include "driver.h"
#include <kdebug.h>
DEBUG_REGISTER_DISABLED(LexerCache)
LexerCache::LexerCache(Driver* d) : m_driver(d) {}
void LexerCache::addLexedFile(const CachedLexedFilePointer& file)
{
//kdDebug(9007) << "LexerCache: adding an instance of " << file->fileName().str() << endl;
DEBUG("LexerCache") << "adding an instance of " << file->fileName().str() << endl;
std::pair< CachedLexedFileMap::iterator, CachedLexedFileMap::iterator> files = m_files.equal_range(file->fileName());
......@@ -40,7 +44,7 @@ void LexerCache::addLexedFile(const CachedLexedFilePointer& file)
files.first++;
}
}
//kdDebug(9007) << "LexerCache: new count of cached instances for the file: " << cnt << endl;
DEBUG("LexerCache") << "new count of cached instances for the file: " << cnt << endl;
}
CachedLexedFilePointer LexerCache::lexedFile(const HashedString& fileName)
......@@ -51,14 +55,14 @@ CachedLexedFilePointer LexerCache::lexedFile(const HashedString& fileName)
///@todo optimize with standard-algorithms(by first computing the intersection)
/* if(files.first != files.second)
//kdDebug(9007) << "LexerCache: cache for file " << fileName.str() << " is not empty" << endl;
DEBUG(DBG_SRC) << "LexerCache: cache for file " << fileName.str() << " is not empty" << endl;
else
//kdDebug(9007) << "LexerCache: cache for file " << fileName.str() << " is empty" << endl;*/
DEBUG(DBG_SRC) << "LexerCache: cache for file " << fileName.str() << " is empty" << endl;*/
while (files.first != files.second) {
const CachedLexedFile& file(*(*(files.first)).second);
if (sourceChanged(file)) {
//kdDebug(9007) << "LexerCache: cache for file " << fileName.str() << " is being discarded because the file was modified" << endl;
DEBUG("LexerCache") << "cache for file " << fileName.str() << " is being discarded because the file was modified" << endl;
m_files.erase(files.first++);
continue;
}
......@@ -75,7 +79,7 @@ CachedLexedFilePointer LexerCache::lexedFile(const HashedString& fileName)
if (file.m_usedMacros.hasMacro((*it).first)) {
Macro m(file.m_usedMacros.macro((*it).first.str()));
if (!(m == (*it).second)) {
//kdDebug(9007) << "LexerCache: The cached file " << fileName.str() << " depends on the string \"" << (*it).first.str() << "\" and used a macro for it with the body \"" << m.body() << "\"(from " << m.fileName() << "), but the driver contains the same macro with body \"" << (*it).second.body() << "\"(from " << (*it).second.fileName() << "), cache is not used" << endl;
DEBUG("LexerCache") << "The cached file " << fileName.str() << " depends on the string \"" << (*it).first.str() << "\" and used a macro for it with the body \"" << m.body() << "\"(from " << m.fileName() << "), but the driver contains the same macro with body \"" << (*it).second.body() << "\"(from " << (*it).second.fileName() << "), cache is not used" << endl;
//Macro with the same name was used, but it is different
success = false;
......@@ -84,7 +88,7 @@ CachedLexedFilePointer LexerCache::lexedFile(const HashedString& fileName)
} else {
//There is a macro that affects the file, but was not used while the previous parse
//kdDebug(9007) << "LexerCache: The cached file " << fileName.str() << " depends on the string \"" << (*it).first.str() << "\" and the driver contains a macro of that name with body \"" << (*it).second.body() << "\"(from " << (*it).second.fileName() << "), the cached file is not used" << endl;
DEBUG("LexerCache") << "The cached file " << fileName.str() << " depends on the string \"" << (*it).first.str() << "\" and the driver contains a macro of that name with body \"" << (*it).second.body() << "\"(from " << (*it).second.fileName() << "), the cached file is not used" << endl;
success = false;
break;
}
......@@ -94,14 +98,14 @@ CachedLexedFilePointer LexerCache::lexedFile(const HashedString& fileName)
MacroSet::Macros::const_iterator end2 = file.usedMacros().macros().end();
for (MacroSet::Macros::const_iterator it = file.usedMacros().macros().begin(); it != end2; ++it) {
if (!m_driver->hasMacro(HashedString((*it).name()))) {
//kdDebug(9007) << "LexerCache: The cached file " << fileName.str() << " used a macro called \"" << it->name() << "\"(from " << it->fileName() << "), but the driver does not contain that macro, the cached file is not used" << endl;
DEBUG("LexerCache") << "The cached file " << fileName.str() << " used a macro called \"" << it->name() << "\"(from " << it->fileName() << "), but the driver does not contain that macro, the cached file is not used" << endl;
success = false;
break;
}
}
if (success) {
//kdDebug(9007) << "LexerCache: Using cached file " << fileName.str() << endl;
DEBUG("LexerCache") << "Using cached file " << fileName.str() << endl;
(*files.first).second->access();
return (*files.first).second;
}
......@@ -164,7 +168,7 @@ void LexerCache::erase(const CacheNode* node)
}
files.first++;
}
//kdDebug(9007) << "Error: could not find a node in the list for file " << ((const CachedLexedFile*)(node))->fileName().str() << endl;
DEBUG("LexerCache") << "Error: could not find a node in the list for file " << ((const CachedLexedFile*)(node))->fileName().str() << endl;
}
CachedLexedFile::CachedLexedFile(const HashedString& fileName, LexerCache* manager) : CacheNode(manager), m_fileName(fileName)
......@@ -176,9 +180,8 @@ CachedLexedFile::CachedLexedFile(const HashedString& fileName, LexerCache* manag
void CachedLexedFile::addDefinedMacro(const Macro& macro)
{
#ifdef LEXERCACHE_DEBUG
//kdDebug(9007) << "defined macro " << macro.name() << endl;
#endif
DEBUG("LexerCache") << "defined macro " << macro.name() << endl;
m_definedMacros.addMacro(macro);
m_definedMacroNames.insert(HashedString(macro.name()));
}
......@@ -186,9 +189,7 @@ void CachedLexedFile::addDefinedMacro(const Macro& macro)
void CachedLexedFile::addUsedMacro(const Macro& macro)
{
if (!m_definedMacros.hasMacro(macro.name())) {
#ifdef LEXERCACHE_DEBUG
//kdDebug(9007) << "used macro " << macro.name() << endl;
#endif
DEBUG("LexerCache") << "used macro " << macro.name() << endl;
m_usedMacros.addMacro(macro);
}
}
......@@ -218,9 +219,8 @@ QList<Problem> CachedLexedFile::problems() const
//The parameter should be a CachedLexedFile that was lexed AFTER the content of this file
void CachedLexedFile::merge(const CachedLexedFile& file)
{
#ifdef LEXERCACHE_DEBUG
//kdDebug(9007) << fileName().str() << ": merging " << file.fileName().str() << endl << "defined in this: " << m_definedMacroNames.print().c_str() << endl << "defined macros in other: " << file.m_definedMacroNames.print().c_str() << endl;;
#endif
DEBUG("LexerCache") << fileName().str() << ": merging " << file.fileName().str() << endl << "defined in this: " << m_definedMacroNames.print().c_str() << endl << "defined macros in other: " << file.m_definedMacroNames.print().c_str() << endl;;
HashedStringSet tempStrings = file.m_strings;
tempStrings -= m_definedMacroNames;
m_strings += tempStrings;
......@@ -228,9 +228,7 @@ void CachedLexedFile::merge(const CachedLexedFile& file)
//Only add macros to the usedMacros-list that were not defined locally
for (MacroSet::Macros::const_iterator it = file.m_usedMacros.macros().begin(); it != file.m_usedMacros.macros().end(); ++it) {
if (!m_definedMacros.hasMacro((*it).name())) { ///If the macro was not defined locally, add it to the macros-list.
#ifdef LEXERCACHE_DEBUG
//kdDebug(9007) << "inserting used macro " << (*it).name() << endl;
#endif
DEBUG("LexerCache") << "inserting used macro " << (*it).name() << endl;
m_usedMacros.addMacro(*it);
}
}
......@@ -241,10 +239,8 @@ void CachedLexedFile::merge(const CachedLexedFile& file)
for (QMap<HashedString, QDateTime>::const_iterator it = file.m_allModificationTimes.begin(); it != file.m_allModificationTimes.end(); ++it)
m_allModificationTimes[it.key()] = *it;
DEBUG("LexerCache") << fileName().str() << ": defined in this after merge: " << m_definedMacroNames.print().c_str() << endl;
#ifdef LEXERCACHE_DEBUG
//kdDebug(9007) << fileName().str() << ": defined in this after merge: " << m_definedMacroNames.print().c_str() << endl;
#endif
m_problems += file.m_problems;
}
......
......@@ -41,7 +41,7 @@ void TreeParser::parseTranslationUnit(const ParsedFile& translationUnit)
QList<DeclarationAST*>::const_iterator it = declarations.constBegin();
for (; it != declarations.constEnd(); it++) {
if ((*it) == 0) {
//kdDebug(9007) << "declaration is zero" << endl;
DEBUG("TreeParser") << "declaration is zero" << endl;
continue;
}
parseDeclaration(*it);
......
......@@ -47,6 +47,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/codeimpwizard/
${CMAKE_CURRENT_SOURCE_DIR}/debug/
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/
${CMAKE_CURRENT_SOURCE_DIR}/docgenerators/
${CMAKE_CURRENT_SOURCE_DIR}/finder/
${CMAKE_CURRENT_SOURCE_DIR}/refactoring/
......@@ -170,41 +171,23 @@ set(libdocgenerator_SRCS
)
set(libdialogs_SRCS
dialogs/autolayoutoptionpage.cpp
dialogs/activitydialog.cpp
dialogs/activitypage.cpp
dialogs/assocgenpage.cpp
dialogs/assocpage.cpp
dialogs/assocpropdlg.cpp
dialogs/assocrolepage.cpp
dialogs/classgenpage.cpp
dialogs/classifierlistpage.cpp
dialogs/constraintlistpage.cpp
dialogs/classoptionspage.cpp
dialogs/classpropdlg.cpp
dialogs/associationpropertiesdialog.cpp
dialogs/classpropertiesdialog.cpp
dialogs/classwizard.cpp
dialogs/codeeditor.cpp
dialogs/codegenerationpolicypage.cpp
dialogs/codeimportoptionspage.cpp
dialogs/codeviewerdialog.cpp
dialogs/codevieweroptionspage.cpp
dialogs/codetextedit.cpp
dialogs/codetexthighlighter.cpp
dialogs/defaultcodegenpolicypage.cpp
dialogs/diagrampropertiespage.cpp
dialogs/diagramprintpage.cpp
dialogs/dialog_utils.cpp
dialogs/dialogbase.cpp
dialogs/dialogpagebase.cpp
dialogs/exportallviewsdialog.cpp
dialogs/finddialog.cpp
dialogs/generaloptionpage.cpp
dialogs/objectnodedialog.cpp
dialogs/overwritedialogue.cpp
dialogs/pkgcontentspage.cpp
dialogs/parmpropdlg.cpp
dialogs/selectopdlg.cpp
dialogs/settingsdlg.cpp
dialogs/overwritedialog.cpp
dialogs/parameterpropertiesdialog.cpp
dialogs/selectoperationdialog.cpp
dialogs/settingsdialog.cpp
dialogs/statedialog.cpp
dialogs/umlattributedialog.cpp
dialogs/umlcheckconstraintdialog.cpp
......@@ -214,21 +197,39 @@ set(libdialogs_SRCS
dialogs/umloperationdialog.cpp
dialogs/umltemplatedialog.cpp
dialogs/umlroledialog.cpp
dialogs/umlroleproperties.cpp
dialogs/umluniqueconstraintdialog.cpp
dialogs/umlviewdialog.cpp
dialogs/umlwidgetstylepage.cpp
dialogs/pages/activitypage.cpp
dialogs/pages/associationgeneralpage.cpp
dialogs/pages/associationrolepage.cpp
dialogs/pages/autolayoutoptionpage.cpp
dialogs/pages/classassociationspage.cpp
dialogs/pages/classgeneralpage.cpp
dialogs/pages/classifierlistpage.cpp
dialogs/pages/classoptionspage.cpp
dialogs/pages/codegenerationpolicypage.cpp
dialogs/pages/codeimportoptionspage.cpp
dialogs/pages/codevieweroptionspage.cpp
dialogs/pages/constraintlistpage.cpp
dialogs/pages/defaultcodegenpolicypage.cpp
dialogs/pages/diagrampropertiespage.cpp
dialogs/pages/dialogpagebase.cpp
dialogs/pages/generaloptionpage.cpp
dialogs/pages/packagecontentspage.cpp
dialogs/pages/diagramprintpage.cpp
dialogs/pages/umlroleproperties.cpp
dialogs/pages/umlwidgetstylepage.cpp
)
kde4_add_ui_files( libdialogs_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/autolayoutoptionpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/codeviewerdialogbase.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/codevieweroptionsbase.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/exportallviewsdialogbase.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/finddialog.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/umlrolepropertiesbase.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/diagrampropertiespage.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/codeimportoptionspage.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/autolayoutoptionpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/codeimportoptionspage.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/diagrampropertiespage.ui
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/pages/umlrolepropertiesbase.ui
)
set(librefactoring_SRCS
......@@ -352,6 +353,7 @@ set(libwidgets_SRCS
widgets/objectwidget.cpp
widgets/packagewidget.cpp
widgets/pinwidget.cpp
widgets/portwidget.cpp
widgets/preconditionwidget.cpp
widgets/regionwidget.cpp
widgets/seqlinewidget.cpp
......@@ -402,6 +404,7 @@ set(libumbrello_SRCS
folder.cpp
foreignkeyconstraint.cpp
icon_utils.cpp
import_argo.cpp
import_rose.cpp
layoutgenerator.cpp
listpopupmenu.cpp
......@@ -414,6 +417,7 @@ set(libumbrello_SRCS
package.cpp
petalnode.cpp
petaltree2uml.cpp
port.cpp
stereotype.cpp
template.cpp
toolbarstate.cpp
......@@ -444,6 +448,7 @@ set(libumbrello_SRCS
uniqueid.cpp
usecase.cpp
worktoolbar.cpp
umlappprivate.cpp
)
kde4_add_kcfg_files(umbrello_SRCS umbrellosettings.kcfgc)
......@@ -469,7 +474,7 @@ set(umbrello_SRCS
kde4_add_app_icon(umbrello_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/global/hi*-app-umbrello.png")
kde4_add_executable(umbrello ${umbrello_SRCS})
target_link_libraries(umbrello ${KDE4_KFILE_LIBS} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES})
target_link_libraries(umbrello ${KDE4_KFILE_LIBS} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${KDE4_KTEXTEDITOR_LIBS})
install(TARGETS umbrello ${INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files #############
......
......@@ -502,6 +502,8 @@ UMLObject* UMLAssociation::getObject(Uml::RoleType::Enum role) const
Uml::ID::Type UMLAssociation::getObjectId(Uml::RoleType::Enum role) const
{
UMLRole *roleObj = m_pRole[role];
if (roleObj == NULL)
return Uml::ID::None;
UMLObject *o = roleObj->object();
if (o == NULL) {
QString auxID = roleObj->secondaryId();
......
......@@ -356,7 +356,7 @@ Uml::AssociationType::Enum AssocRules::isGeneralisationOrRealisation(UMLWidget*
return Uml::AssociationType::Generalization;
}
AssocRules::Assoc_Rule AssocRules::m_AssocRules []= {
AssocRules::Assoc_Rule AssocRules::m_AssocRules[] = {
// Association widgetA widgetB role multi bidir. self
//---------------------------------------+--------------------------+---------------------------+-------+-------+-------+--------