diff -Nru umbrello-4.12.90/CMakeLists.txt umbrello-4.12.95/CMakeLists.txt --- umbrello-4.12.90/CMakeLists.txt 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/CMakeLists.txt 2014-03-18 05:53:49.000000000 +0000 @@ -8,7 +8,7 @@ set(VERSION_MAJOR "2") set(VERSION_MINOR "12") -set(VERSION_PATCH "99") +set(VERSION_PATCH "95") # set default umbrello version # umbrello version could be overridden by cmake command line using -DUMBRELLO_VERSION_STRING=major.minor.patch diff -Nru umbrello-4.12.90/debian/changelog umbrello-4.12.95/debian/changelog --- umbrello-4.12.90/debian/changelog 2014-03-19 12:12:52.000000000 +0000 +++ umbrello-4.12.95/debian/changelog 2014-03-23 12:07:55.000000000 +0000 @@ -1,3 +1,9 @@ +umbrello (4:4.12.95-0ubuntu1) trusty; urgency=medium + + * New upstream beta release + + -- Rohan Garg Sun, 23 Mar 2014 13:07:54 +0100 + umbrello (4:4.12.90-0ubuntu1) trusty; urgency=medium * New upstream beta release diff -Nru umbrello-4.12.90/debian/control umbrello-4.12.95/debian/control --- umbrello-4.12.90/debian/control 2014-03-19 12:12:52.000000000 +0000 +++ umbrello-4.12.95/debian/control 2014-03-23 12:07:55.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: Kubuntu Developers Build-Depends: kde-sc-dev-latest (>= 4:4.10.2), cmake, debhelper (>= 9), pkg-kde-tools (>= 0.12), - kdelibs5-dev (>= 4:4.12.90), + kdelibs5-dev (>= 4:4.12.95), libxslt1-dev, libxml2-dev, libboost1.54-dev Standards-Version: 3.9.4 Homepage: http://www.kde.org diff -Nru umbrello-4.12.90/lib/cppparser/cachemanager.h umbrello-4.12.95/lib/cppparser/cachemanager.h --- umbrello-4.12.90/lib/cppparser/cachemanager.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/cachemanager.h 2014-03-18 05:53:49.000000000 +0000 @@ -21,6 +21,13 @@ class CacheManager; +#ifndef inline +#define inline __inline +#endif + +#ifdef _MSC_VER +typedef unsigned int uint; +#endif class CacheNode { diff -Nru umbrello-4.12.90/lib/cppparser/driver.h umbrello-4.12.95/lib/cppparser/driver.h --- umbrello-4.12.90/lib/cppparser/driver.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/driver.h 2014-03-18 05:53:49.000000000 +0000 @@ -32,7 +32,6 @@ #include #include #include -#include #include "lexercache.h" diff -Nru umbrello-4.12.90/lib/cppparser/keywords.h umbrello-4.12.95/lib/cppparser/keywords.h --- umbrello-4.12.90/lib/cppparser/keywords.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/keywords.h 2014-03-18 05:53:49.000000000 +0000 @@ -2,7 +2,7 @@ // Keywords file is included in lookup.cpp // [erbsland] replacement for old hash table // -#define INSERT(x, y) keywords.insert(std::pair(x, y)) +#define INSERT(x, y) keywords.insert(x, y) // KDE Keywords INSERT("K_DCOP", Token_K_DCOP); INSERT("k_dcop", Token_k_dcop); diff -Nru umbrello-4.12.90/lib/cppparser/lexercache.cpp umbrello-4.12.95/lib/cppparser/lexercache.cpp --- umbrello-4.12.90/lib/cppparser/lexercache.cpp 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/lexercache.cpp 2014-03-18 05:53:49.000000000 +0000 @@ -115,8 +115,8 @@ FileModificationMap::const_iterator it = m_fileModificationCache.find(fileName); if (it != m_fileModificationCache.end()) { ///Use the cache for 10 seconds - if ((*it).second.m_readTime.secsTo(m_currentDateTime) < 10) { - return (*it).second.m_modificationTime; + if ((*it).m_readTime.secsTo(m_currentDateTime) < 10) { + return (*it).m_modificationTime; } } diff -Nru umbrello-4.12.90/lib/cppparser/lexercache.h umbrello-4.12.95/lib/cppparser/lexercache.h --- umbrello-4.12.90/lib/cppparser/lexercache.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/lexercache.h 2014-03-18 05:53:49.000000000 +0000 @@ -15,12 +15,11 @@ #ifndef LEXERCACHE_H #define LEXERCACHE_H #include -#include #include "macro.h" #include #include #include -#include +#include #include "cachemanager.h" //#define LEXERCACHE_DEBUG @@ -141,7 +140,7 @@ const HashedString& unifyString(const HashedString& str) { - __gnu_cxx::hash_set::const_iterator it = m_totalStringSet.find(str); + QSet::const_iterator it = m_totalStringSet.find(str); if (it != m_totalStringSet.end()) { return *it; } else { @@ -159,12 +158,12 @@ //typedef __gnu_cxx::hash_multimap CachedLexedFileMap; typedef std::multimap CachedLexedFileMap; CachedLexedFileMap m_files; - __gnu_cxx::hash_set m_totalStringSet; ///This is used to reduce memory-usage: Most strings appear again and again. Because QString is reference-counted, this set contains a unique copy of each string to used for each appearance of the string + QSet m_totalStringSet; ///This is used to reduce memory-usage: Most strings appear again and again. Because QString is reference-counted, this set contains a unique copy of each string to used for each appearance of the string struct FileModificationCache { QDateTime m_readTime; QDateTime m_modificationTime; }; - typedef __gnu_cxx::hash_map FileModificationMap; + typedef QHash FileModificationMap; FileModificationMap m_fileModificationCache; Driver* m_driver; QDateTime m_currentDateTime; diff -Nru umbrello-4.12.90/lib/cppparser/lexer.cpp umbrello-4.12.95/lib/cppparser/lexer.cpp --- umbrello-4.12.90/lib/cppparser/lexer.cpp 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/lexer.cpp 2014-03-18 05:53:49.000000000 +0000 @@ -422,18 +422,18 @@ tk.setStartPosition(startLine, startColumn); tk.setEndPosition(m_currentLine, m_currentColumn); } else if (m_skipWordsEnabled) { - __gnu_cxx::hash_map< HashedString, QPair >::iterator pos = m_words.find(ide); + QHash< HashedString, QPair >::iterator pos = m_words.find(ide); if (pos != m_words.end()) { - if ((*pos).second.first == SkipWordAndArguments) { + if ((*pos).first == SkipWordAndArguments) { readWhiteSpaces(); if (currentChar() == '(') skip('(', ')'); } - if (!(*pos).second.second.isEmpty()) { + if (!(*pos).second.isEmpty()) { #if defined(KDEVELOP_BGPARSER) qthread_yield(); #endif - insertCurrent(QString(" ") + (*pos).second.second + QString(" ")); + insertCurrent(QString(" ") + (*pos).second + QString(" ")); } } else if ( /*qt_rx.exactMatch(ide) ||*/ ide.str().endsWith(QLatin1String("EXPORT")) || diff -Nru umbrello-4.12.90/lib/cppparser/lexer.h umbrello-4.12.95/lib/cppparser/lexer.h --- umbrello-4.12.90/lib/cppparser/lexer.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/lexer.h 2014-03-18 05:53:49.000000000 +0000 @@ -28,7 +28,6 @@ #include #include #include -#include #define CHARTYPE QChar @@ -331,7 +330,7 @@ bool m_recordComments; bool m_recordWhiteSpaces; bool m_startLine; - __gnu_cxx::hash_map< HashedString, QPair > m_words; + QHash< HashedString, QPair > m_words; int m_skippedLines; diff -Nru umbrello-4.12.90/lib/cppparser/lookup.cpp umbrello-4.12.95/lib/cppparser/lookup.cpp --- umbrello-4.12.90/lib/cppparser/lookup.cpp 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/lookup.cpp 2014-03-18 05:53:49.000000000 +0000 @@ -25,7 +25,7 @@ KeywordMap::const_iterator it = keywords().find(s); if (it == keywords().end()) return -1; - return static_cast((*it).second); + return static_cast((*it)); } const Lookup::KeywordMap& Lookup::keywords() diff -Nru umbrello-4.12.90/lib/cppparser/lookup.h umbrello-4.12.95/lib/cppparser/lookup.h --- umbrello-4.12.90/lib/cppparser/lookup.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/lookup.h 2014-03-18 05:53:49.000000000 +0000 @@ -25,7 +25,6 @@ #include #include "lexer.h" -#include #include /** @@ -34,7 +33,7 @@ class Lookup { public: - typedef __gnu_cxx::hash_map KeywordMap; + typedef QHash KeywordMap; /** * Find an entry in the table, and return its value */ diff -Nru umbrello-4.12.90/lib/cppparser/macro.h umbrello-4.12.95/lib/cppparser/macro.h --- umbrello-4.12.90/lib/cppparser/macro.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/cppparser/macro.h 2014-03-18 05:53:49.000000000 +0000 @@ -26,7 +26,6 @@ #include #include #include -#include typedef signed char Q_INT8; diff -Nru umbrello-4.12.90/lib/interfaces/hashedstring.cpp umbrello-4.12.95/lib/interfaces/hashedstring.cpp --- umbrello-4.12.90/lib/interfaces/hashedstring.cpp 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/interfaces/hashedstring.cpp 2014-03-18 05:53:49.000000000 +0000 @@ -17,9 +17,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include //It needs to be measured whether this flag should be turned on or off. It seems just to move the complexity from one position to the other, without any variant being really better. #define USE_HASHMAP @@ -67,9 +67,9 @@ { public: #ifdef USE_HASHMAP - typedef __gnu_cxx::hash_set StringSet; + typedef QSet StringSet; #else - typedef std::set StringSet; //must be a set, so the set-algorithms work + typedef QSet StringSet; //must be a set, so the set-algorithms work #endif StringSet m_files; mutable bool m_hashValid; @@ -139,7 +139,9 @@ std::set_union(oldData->m_files.begin(), oldData->m_files.end(), rhs.m_data->m_files.begin(), rhs.m_data->m_files.end(), std::insert_iterator(m_data->m_files, m_data->m_files.end())); #else makeDataPrivate(); - m_data->m_files.insert(rhs.m_data->m_files.begin(), rhs.m_data->m_files.end()); + for (HashedStringSetData::StringSet::const_iterator it = rhs.m_data->m_files.begin(); it != rhs.m_data->m_files.end(); ++it) { + m_data->m_files.insert(*it); + } /*HashedStringSetData::StringSet::const_iterator end = rhs.m_data->m_files.end(); HashedStringSetData::StringSet& mySet(m_data->m_files); for(HashedStringSetData::StringSet::const_iterator it = rhs.m_data->m_files.begin(); it != end; ++it) { @@ -163,7 +165,7 @@ HashedStringSetData::StringSet::const_iterator end = rhs.m_data->m_files.end(); HashedStringSetData::StringSet& mySet(m_data->m_files); for (HashedStringSetData::StringSet::const_iterator it = rhs.m_data->m_files.begin(); it != end; ++it) { - mySet.erase(*it); + mySet.remove(*it); } #endif @@ -314,9 +316,9 @@ for (HashedStringSetData::StringSet::const_iterator it = set.m_data->m_files.begin(); it != set.m_data->m_files.end(); ++it) { GroupMap::iterator itr = m_map.find(*it); if (itr == m_map.end()) { - itr = m_map.insert(std::make_pair(*it, ItemSet())).first; + itr = m_map.insert(*it, ItemSet()); } - itr->second.insert(id); + itr->insert(id); } } else { m_global.insert(id); @@ -342,9 +344,9 @@ { m_disabled.erase(id); m_global.erase(id); - m_sizeMap.erase(id); + m_sizeMap.remove(id); for (GroupMap::iterator it = m_map.begin(); it != m_map.end(); ++it) { - it->second.erase(id); + it->erase(id); } } @@ -356,7 +358,7 @@ return; } //This might yet be optimized by sorting the sets according to their size, and starting the intersectioning with the smallest ones. - __gnu_cxx::hash_map hitCounts; + QHash hitCounts; for (HashedStringSetData::StringSet::const_iterator it = strings.m_data->m_files.begin(); it != strings.m_data->m_files.end(); ++it) { GroupMap::const_iterator itr = m_map.find(*it); @@ -365,10 +367,10 @@ continue; } - for (ItemSet::const_iterator it2 = itr->second.begin(); it2 != itr->second.end(); ++it2) { - __gnu_cxx::hash_map::iterator v = hitCounts.find(*it2); + for (ItemSet::const_iterator it2 = itr->begin(); it2 != itr->end(); ++it2) { + QHash::iterator v = hitCounts.find(*it2); if (v != hitCounts.end()) { - ++(*v).second; + ++(*v); } else { hitCounts[*it2] = 1; } @@ -377,9 +379,9 @@ //Now count together all groups that are completely within the given string-set(their hitCount equals their size) ItemSet found; - for (__gnu_cxx::hash_map::const_iterator it = hitCounts.begin(); it != hitCounts.end(); ++it) { - if ((*it).second == (*m_sizeMap.find((*it).first)).second) - found.insert((*it).first); + for (QHash::const_iterator it = hitCounts.begin(); it != hitCounts.end(); ++it) { + if (it.value() == (*m_sizeMap.find(it.key()))) + found.insert(it.key()); } @@ -389,3 +391,8 @@ target.clear(); std::set_difference(found.begin(), found.end(), m_disabled.begin(), m_disabled.end(), std::insert_iterator(target, target.end())); } + +uint qHash(const HashedString &key) +{ + return key.hash(); +} diff -Nru umbrello-4.12.90/lib/interfaces/hashedstring.h umbrello-4.12.95/lib/interfaces/hashedstring.h --- umbrello-4.12.90/lib/interfaces/hashedstring.h 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/lib/interfaces/hashedstring.h 2014-03-18 05:53:49.000000000 +0000 @@ -17,10 +17,11 @@ #include "ast.h" +#include +#include #include #include #include -#include #include ///A simple class that stores a string together with it's appropriate hash-key @@ -131,17 +132,6 @@ HashedStringSet operator + (const HashedStringSet& lhs, const HashedStringSet& rhs); -namespace __gnu_cxx -{ -template<> -struct hash { - size_t operator () (const HashedString& str) const - { - return str.hash(); - } -}; -} - ///Used to find all registered HashedStringSet's that contain all strings given to findGroups(..) class HashedStringSetGroup { @@ -157,11 +147,14 @@ void findGroups(HashedStringSet strings, ItemSet& target) const; private: - typedef __gnu_cxx::hash_map GroupMap; - typedef __gnu_cxx::hash_map SizeMap; + typedef QHash GroupMap; + typedef QHash SizeMap; GroupMap m_map; SizeMap m_sizeMap; ItemSet m_disabled; ItemSet m_global; }; + +uint qHash(const HashedString &key); + #endif diff -Nru umbrello-4.12.90/umbrello/codeimport/cppimport.cpp umbrello-4.12.95/umbrello/codeimport/cppimport.cpp --- umbrello-4.12.90/umbrello/codeimport/cppimport.cpp 2014-03-05 15:04:09.000000000 +0000 +++ umbrello-4.12.95/umbrello/codeimport/cppimport.cpp 2014-03-18 05:53:49.000000000 +0000 @@ -75,7 +75,6 @@ { if (ms_seenFiles.indexOf(fileName) != -1) return; - ms_seenFiles.append(fileName); QMap deps = ms_driver->dependences(fileName); if (! deps.empty()) { QMap::Iterator it; @@ -97,6 +96,7 @@ uError() << fileName << " not found"; return; } + ms_seenFiles.append(fileName); CppTree2Uml modelFeeder(fileName, m_thread); modelFeeder.parseTranslationUnit(*ast); }