src: correct spelling errors (#1162)

This commit is contained in:
Josh Soref
2021-03-14 07:47:26 +01:00
committed by GitHub
parent 5932e9f1e8
commit 3a75ef0df4
97 changed files with 261 additions and 261 deletions
@@ -16,7 +16,7 @@
#include "utility.h"
#include "utilityString.h"
const std::wstring BookmarkController::s_edgeSeperatorToken = L" => ";
const std::wstring BookmarkController::s_edgeSeparatorToken = L" => ";
const std::wstring BookmarkController::s_defaultCategoryName = L"default";
BookmarkController::BookmarkController(StorageAccess* storageAccess)
@@ -509,7 +509,7 @@ std::vector<std::wstring> BookmarkController::getActiveEdgeDisplayNames() const
const StorageEdge activeEdge = m_storageAccess->getEdgeById(activeEdgeId);
const std::wstring sourceDisplayName = getNodeDisplayName(activeEdge.sourceNodeId);
const std::wstring targetDisplayName = getNodeDisplayName(activeEdge.targetNodeId);
activeEdgeDisplayNames.push_back(sourceDisplayName + s_edgeSeperatorToken + targetDisplayName);
activeEdgeDisplayNames.push_back(sourceDisplayName + s_edgeSeparatorToken + targetDisplayName);
}
return activeEdgeDisplayNames;
}
@@ -120,7 +120,7 @@ private:
void update();
static const std::wstring s_edgeSeperatorToken;
static const std::wstring s_edgeSeparatorToken;
static const std::wstring s_defaultCategoryName;
StorageAccess* m_storageAccess;
@@ -1333,7 +1333,7 @@ CodeFileParams* CodeController::addSourceLocations(std::shared_ptr<SourceLocatio
{
return nullptr;
}
else if (oldSnippet.startLineNumber < start || oldSnippet.endLineNumber > end) // overlaping
else if (oldSnippet.startLineNumber < start || oldSnippet.endLineNumber > end) // overlapping
{
newSnippet = CodeSnippetParams::merge(newSnippet, oldSnippet);
}
@@ -2151,7 +2151,7 @@ void GraphController::layoutToGrid(DummyNode* node) const
return;
}
// Increase size of nodes with visible chilren to cover full grid cells
// Increase size of nodes with visible children to cover full grid cells
size_t width = GraphViewStyle::toGridSize(node->size.x);
size_t height = GraphViewStyle::toGridSize(node->size.y);
@@ -2440,7 +2440,7 @@ void GraphController::createLegendGraph()
Node* main = addNode(NODE_CLASS, L"Class", Vec2i(x + 200, y + 130));
Node* derived = addNode(NODE_CLASS, L"Derived Class", Vec2i(x + 210, y + 380));
Node* user = addNode(NODE_TYPE, L"Referencing Type", Vec2i(x - 10, y + 220));
Node* usee = addNode(NODE_TYPE, L"Referenced Type", Vec2i(x + 410, y + 220));
Node* used = addNode(NODE_TYPE, L"Referenced Type", Vec2i(x + 410, y + 220));
addEdge(Edge::EDGE_INHERITANCE, main, base);
addEdge(Edge::EDGE_INHERITANCE, derived, main);
@@ -2457,7 +2457,7 @@ void GraphController::createLegendGraph()
}
{
Edge* edge = addEdge(Edge::EDGE_BUNDLED_EDGES, main, usee);
Edge* edge = addEdge(Edge::EDGE_BUNDLED_EDGES, main, used);
std::shared_ptr<TokenComponentBundledEdges> bundledEdgesComp =
std::make_shared<TokenComponentBundledEdges>();
for (size_t i = 0; i < 10; i++)
@@ -35,7 +35,7 @@ std::deque<SnippetMerger::Range> SnippetMerger::merge(std::vector<SnippetMerger:
// merge children
const int snippetMergeRange = 2 * snippetExpandRange +
1; // +1 since snippets that end/start with consequtive
1; // +1 since snippets that end/start with consecutive
// lines should be merged as well.
merged = Range::mergeAdjacent(merged, snippetMergeRange);
@@ -6,7 +6,7 @@
const char* InterprocessIntermediateStorageManager::s_sharedMemoryNamePrefix = "iist_";
const char* InterprocessIntermediateStorageManager::s_intermediatStoragesKeyName =
const char* InterprocessIntermediateStorageManager::s_intermediateStoragesKeyName =
"intermediate_storages";
InterprocessIntermediateStorageManager::InterprocessIntermediateStorageManager(
@@ -56,7 +56,7 @@ void InterprocessIntermediateStorageManager::pushIntermediateStorage(
SharedMemory::Queue<SharedIntermediateStorage>* queue =
access.accessValueWithAllocator<SharedMemory::Queue<SharedIntermediateStorage>>(
s_intermediatStoragesKeyName);
s_intermediateStoragesKeyName);
if (!queue)
{
return;
@@ -97,7 +97,7 @@ std::shared_ptr<IntermediateStorage> InterprocessIntermediateStorageManager::pop
SharedMemory::Queue<SharedIntermediateStorage>* queue =
access.accessValueWithAllocator<SharedMemory::Queue<SharedIntermediateStorage>>(
s_intermediatStoragesKeyName);
s_intermediateStoragesKeyName);
if (!queue || !queue->size())
{
return nullptr;
@@ -131,7 +131,7 @@ size_t InterprocessIntermediateStorageManager::getIntermediateStorageCount()
SharedMemory::Queue<SharedIntermediateStorage>* queue =
access.accessValueWithAllocator<SharedMemory::Queue<SharedIntermediateStorage>>(
s_intermediatStoragesKeyName);
s_intermediateStoragesKeyName);
if (!queue)
{
return 0;
@@ -18,7 +18,7 @@ public:
private:
static const char* s_sharedMemoryNamePrefix;
static const char* s_intermediatStoragesKeyName;
static const char* s_intermediateStoragesKeyName;
size_t m_insertsWithoutGrowth;
};
@@ -167,11 +167,11 @@ std::set<StorageOccurrence> SharedIntermediateStorage::getStorageOccurrences() c
return result;
}
void SharedIntermediateStorage::setStorageOccurrences(const std::set<StorageOccurrence>& storageOccurences)
void SharedIntermediateStorage::setStorageOccurrences(const std::set<StorageOccurrence>& storageOccurrences)
{
m_storageOccurrences.clear();
for (const StorageOccurrence& occurrence: storageOccurences)
for (const StorageOccurrence& occurrence: storageOccurrences)
{
m_storageOccurrences.push_back(toShared(occurrence, m_allocator));
}
@@ -32,7 +32,7 @@ public:
void setStorageSourceLocations(const std::set<StorageSourceLocation>& storageSourceLocations);
std::set<StorageOccurrence> getStorageOccurrences() const;
void setStorageOccurrences(const std::set<StorageOccurrence>& storageOccurences);
void setStorageOccurrences(const std::set<StorageOccurrence>& storageOccurrences);
std::set<StorageComponentAccess> getStorageComponentAccesses() const;
void setStorageComponentAccesses(const std::set<StorageComponentAccess>& storageComponentAccesses);
+4 -4
View File
@@ -619,7 +619,7 @@ std::shared_ptr<SourceLocationCollection> PersistentStorage::getFullTextSearchLo
{
std::vector<std::shared_ptr<std::thread>> threads;
std::mutex collectionMutex;
for (std::vector<FullTextSearchResult> fileResults: utility::splitToEqualySizedParts(
for (std::vector<FullTextSearchResult> fileResults: utility::splitToEquallySizedParts(
m_fullTextSearchIndex.searchForTerm(searchTerm), utility::getIdealThreadCount()))
{
std::shared_ptr<std::thread> thread = std::make_shared<std::thread>(
@@ -2132,11 +2132,11 @@ std::vector<EdgeBookmark> PersistentStorage::getAllEdgeBookmarks() const
std::vector<BookmarkCategory> PersistentStorage::getAllBookmarkCategories() const
{
std::vector<BookmarkCategory> categories;
for (const StorageBookmarkCategory& storageBookmarkCategoriy:
for (const StorageBookmarkCategory& storageBookmarkCategory:
m_sqliteBookmarkStorage.getAllBookmarkCategories())
{
categories.push_back(
BookmarkCategory(storageBookmarkCategoriy.id, storageBookmarkCategoriy.name));
BookmarkCategory(storageBookmarkCategory.id, storageBookmarkCategory.name));
}
return categories;
}
@@ -3347,7 +3347,7 @@ void PersistentStorage::buildFullTextSearchIndex() const
}
}
for (std::vector<StorageFile> part:
utility::splitToEqualySizedParts(indexedFiles, utility::getIdealThreadCount()))
utility::splitToEquallySizedParts(indexedFiles, utility::getIdealThreadCount()))
{
std::shared_ptr<std::thread> thread = std::make_shared<std::thread>(
[&](const std::vector<StorageFile>& files) {
+1 -1
View File
@@ -241,7 +241,7 @@ private:
void addNodesWithParentsAndEdgesToGraph(
const std::vector<Id>& nodeIds,
const std::vector<Id>& edgeIds,
Graph* graphh,
Graph* graph,
bool addChildCount) const;
inline void addFileNodeToGraph(const StorageNode& storageNode, Graph* const graph) const;
void addNodeToGraph(
+3 -3
View File
@@ -193,12 +193,12 @@ void Storage::inject(Storage* injected)
{
// TRACE("inject occurrences");
const std::set<StorageOccurrence>& oldOccurences = injected->getStorageOccurrences();
const std::set<StorageOccurrence>& oldOccurrences = injected->getStorageOccurrences();
std::vector<StorageOccurrence> occurrences;
occurrences.reserve(oldOccurences.size());
occurrences.reserve(oldOccurrences.size());
for (const StorageOccurrence& occurrence: oldOccurences)
for (const StorageOccurrence& occurrence: oldOccurrences)
{
Id elementId = 0;
Id sourceLocationId = 0;
@@ -395,7 +395,7 @@ bool SqliteIndexStorage::addOccurrence(const StorageOccurrence& data)
bool SqliteIndexStorage::addOccurrences(const std::vector<StorageOccurrence>& occurrences)
{
return m_insertOccurenceBatchStatement.execute(occurrences, this);
return m_insertOccurrenceBatchStatement.execute(occurrences, this);
}
bool SqliteIndexStorage::addComponentAccess(const StorageComponentAccess& componentAccess)
@@ -1293,7 +1293,7 @@ void SqliteIndexStorage::setupTables()
m_database.execDML(
"CREATE TABLE IF NOT EXISTS filecontent("
"id INTERGER, "
"id INTEGER, "
"content TEXT, "
"PRIMARY KEY(id), "
"FOREIGN KEY(id) REFERENCES file(id)"
@@ -1404,7 +1404,7 @@ void SqliteIndexStorage::setupPrecompiledStatements()
stmt.bind(int(index) * 6 + 6, int(location.type));
},
m_database);
m_insertOccurenceBatchStatement.compile(
m_insertOccurrenceBatchStatement.compile(
"INSERT OR IGNORE INTO occurrence(element_id, source_location_id) VALUES",
2,
[](CppSQLite3Statement& stmt, const StorageOccurrence& occurrence, size_t index) {
@@ -357,7 +357,7 @@ private:
InsertBatchStatement<StorageSymbol> m_insertSymbolBatchStatement;
InsertBatchStatement<StorageLocalSymbol> m_insertLocalSymbolBatchStatement;
InsertBatchStatement<StorageSourceLocationData> m_insertSourceLocationBatchStatement;
InsertBatchStatement<StorageOccurrence> m_insertOccurenceBatchStatement;
InsertBatchStatement<StorageOccurrence> m_insertOccurrenceBatchStatement;
InsertBatchStatement<StorageComponentAccess> m_insertComponentAccessBatchStatement;
CppSQLite3Statement m_insertElementStmt;
+1 -1
View File
@@ -102,7 +102,7 @@ RefreshInfo RefreshInfoGenerator::getRefreshInfoForUpdatedFiles(
const std::set<FilePath> staticReferencedFilePaths = storage->getReferenced(staticSourceFiles);
const std::set<FilePath> dynamicReferencedFilePaths = storage->getReferenced(filesToClear);
// 2.3.3) Add "dynamicReferencedFilePaths" to "filesToClear" that are not refenced by static
// 2.3.3) Add "dynamicReferencedFilePaths" to "filesToClear" that are not referenced by static
// paths, because these files may not be
// referenced anymore. If they still are, they will be re-added when encountered during
// re-indexing.
@@ -1,5 +1,5 @@
#ifndef SETTNGS_MIGRATOR_H
#define SETTNGS_MIGRATOR_H
#ifndef SETTINGS_MIGRATOR_H
#define SETTINGS_MIGRATOR_H
#include "Migrator.h"
+2 -2
View File
@@ -247,7 +247,7 @@ private:
/*
* Nodes
*
* These types are used to build the tree structure. They are either branches or leafes and
* These types are used to build the tree structure. They are either branches or leaves and
* contain a StringType
*/
@@ -318,7 +318,7 @@ private:
/*
* StringLeaf
*
* Combines Leaf and StringType to allow for creating leafes of different string lengths, that
* Combines Leaf and StringType to allow for creating leaves of different string lengths, that
* can still be stored in a collection of Node types.
*/
template <typename StringType>
@@ -90,7 +90,7 @@ void CommandlineCommandConfig::setup()
"logging-enabled,l", po::value<bool>(), "Enable file/console logging <true/false>")(
"verbose-indexer-logging-enabled,L",
po::value<bool>(),
"Enable additional log of abstract syntax tree during the indexing. <true/false> WARNINIG "
"Enable additional log of abstract syntax tree during the indexing. <true/false> WARNING "
"Slows down "
"indexing speed")(
"jvm-path,j", po::value<std::string>(), "Path to the location of the jvm library")(
+3 -3
View File
@@ -94,12 +94,12 @@ FilePath utility::getExpandedPath(const FilePath& path)
std::vector<FilePath> utility::getExpandedPaths(const std::vector<FilePath>& paths)
{
std::vector<FilePath> expanedPaths;
std::vector<FilePath> expandedPaths;
for (const FilePath& path: paths)
{
utility::append(expanedPaths, path.expandEnvironmentVariables());
utility::append(expandedPaths, path.expandEnvironmentVariables());
}
return expanedPaths;
return expandedPaths;
}
FilePath utility::getExpandedAndAbsolutePath(const FilePath& path, const FilePath& baseDirectory)
+1 -1
View File
@@ -6,7 +6,7 @@
#include "LogManager.h"
/**
* @brief Makros to simplify usage of the log manager
* @brief Macros to simplify usage of the log manager
*/
#define LOG_INFO(__str__) \
do \
+1 -1
View File
@@ -243,7 +243,7 @@ void MessageQueue::sendMessage(std::shared_ptr<MessageBase> message)
{
std::lock_guard<std::mutex> lock(m_listenersMutex);
// m_listenersLength is saved, so that new listeners registered whithin message handling don't
// m_listenersLength is saved, so that new listeners registered within message handling don't
// get the current message and the length can be reduced when a listener gets unregistered.
m_listenersLength = m_listeners.size();
+2 -2
View File
@@ -17,7 +17,7 @@
namespace utility
{
template <typename T>
std::vector<std::vector<T>> splitToEqualySizedParts(
std::vector<std::vector<T>> splitToEquallySizedParts(
const std::vector<T>& values, const size_t desiredPartCount);
template <typename T>
@@ -131,7 +131,7 @@ size_t digits(size_t n);
} // namespace utility
template <typename T>
std::vector<std::vector<T>> utility::splitToEqualySizedParts(
std::vector<std::vector<T>> utility::splitToEquallySizedParts(
const std::vector<T>& values, const size_t desiredPartCount)
{
const size_t partCount = std::max<size_t>(1, std::min(desiredPartCount, values.size()));
@@ -129,7 +129,7 @@ std::shared_ptr<IndexerCommand> CxxIndexerCommandProvider::consumeCommand()
m_commands.begin();
if (it->second)
{
std::shared_ptr<IndexerCommand> command = represetationToCommand(it->first, it->second);
std::shared_ptr<IndexerCommand> command = representationToCommand(it->first, it->second);
m_commands.erase(it);
return command;
}
@@ -144,7 +144,7 @@ std::shared_ptr<IndexerCommand> CxxIndexerCommandProvider::consumeCommandForSour
filePath);
if (it != m_commands.end() && it->second)
{
std::shared_ptr<IndexerCommand> command = represetationToCommand(it->first, it->second);
std::shared_ptr<IndexerCommand> command = representationToCommand(it->first, it->second);
m_commands.erase(it);
return command;
}
@@ -160,7 +160,7 @@ std::vector<std::shared_ptr<IndexerCommand>> CxxIndexerCommandProvider::consumeA
it != m_commands.end();
it++)
{
commands.emplace_back(represetationToCommand(it->first, it->second));
commands.emplace_back(representationToCommand(it->first, it->second));
}
m_commands.clear();
return commands;
@@ -191,7 +191,7 @@ Id CxxIndexerCommandProvider::getId()
return m_nextId++;
}
std::shared_ptr<IndexerCommandCxx> CxxIndexerCommandProvider::represetationToCommand(
std::shared_ptr<IndexerCommandCxx> CxxIndexerCommandProvider::representationToCommand(
const FilePath& sourceFilePath, std::shared_ptr<CommandRepresentation> representation)
{
std::set<FilePath> indexedPaths;
@@ -35,7 +35,7 @@ private:
};
Id getId();
std::shared_ptr<IndexerCommandCxx> represetationToCommand(
std::shared_ptr<IndexerCommandCxx> representationToCommand(
const FilePath& sourceFilePath, std::shared_ptr<CommandRepresentation> representation);
Id m_nextId;
@@ -8,7 +8,7 @@
// This CxxAstVisitorComponent is responsible for recording and providing the context based
// ReferenceKind for each reference to a type encountered while traversing the AST. Example: class
// Foo: public Bar {}; For this snippet the type "Bar" is used in the context of an inheritence.
// Foo: public Bar {}; For this snippet the type "Bar" is used in the context of an inheritance.
class CxxAstVisitorComponentTypeRefKind: public CxxAstVisitorComponent
{
public:
+4 -4
View File
@@ -38,7 +38,7 @@ std::vector<std::string> appendFilePath(const std::vector<std::string>& args, ll
return utility::concat(args, {filePath.str()});
}
// custom implementation of clang::runToolOnCodeWithArgs which also sets our custon DiagnosticConsumer
// custom implementation of clang::runToolOnCodeWithArgs which also sets our custom DiagnosticConsumer
bool runToolOnCodeWithArgs(
clang::DiagnosticConsumer* DiagConsumer,
std::unique_ptr<clang::FrontendAction> ToolAction,
@@ -107,14 +107,14 @@ std::vector<std::string> CxxParser::getCommandlineArgumentsEssential(
void CxxParser::initializeLLVM()
{
static bool intialized = false;
if (!intialized)
static bool initialized = false;
if (!initialized)
{
llvm::InitializeAllTargets();
llvm::InitializeAllTargetMCs();
llvm::InitializeAllAsmPrinters();
llvm::InitializeAllAsmParsers();
intialized = true;
initialized = true;
}
}
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef UTILITY_COMPLIATION_DATABASE_H
#define UTILITY_COMPLIATION_DATABASE_H
#ifndef UTILITY_COMPILATION_DATABASE_H
#define UTILITY_COMPILATION_DATABASE_H
#include <string>
#include <vector>
@@ -29,4 +29,4 @@ private:
} // namespace utility
#endif // UTILITY_COMPLIATION_DATABASE_H
#endif // UTILITY_COMPILATION_DATABASE_H
+2 -2
View File
@@ -34,7 +34,7 @@ std::vector<IncludeDirective> IncludeProcessing::getUnresolvedIncludeDirectives(
std::unordered_set<std::wstring> processedFilePaths;
std::set<IncludeDirective, IncludeDirectiveComparator> unresolvedIncludeDirectives;
std::vector<std::vector<FilePath>> parts = utility::splitToEqualySizedParts(
std::vector<std::vector<FilePath>> parts = utility::splitToEquallySizedParts(
utility::toVector(sourceFilePaths), desiredQuantileCount);
for (size_t i = 0; i < parts.size(); i++)
@@ -78,7 +78,7 @@ std::set<FilePath> IncludeProcessing::getHeaderSearchDirectories(
std::set<FilePath> headerSearchDirectories;
std::unordered_set<std::wstring> processedFilePaths;
std::vector<std::vector<FilePath>> parts = utility::splitToEqualySizedParts(
std::vector<std::vector<FilePath>> parts = utility::splitToEquallySizedParts(
utility::toVector(sourceFilePaths), desiredQuantileCount);
for (size_t i = 0; i < parts.size(); i++)
+2 -2
View File
@@ -37,8 +37,8 @@ add_files(
qt/element/code/QtCodeFileTitleBar.h
qt/element/code/QtCodeFileTitleButton.cpp
qt/element/code/QtCodeFileTitleButton.h
qt/element/code/QtCodeNavigateable.cpp
qt/element/code/QtCodeNavigateable.h
qt/element/code/QtCodeNavigable.cpp
qt/element/code/QtCodeNavigable.h
qt/element/code/QtCodeNavigator.cpp
qt/element/code/QtCodeNavigator.h
qt/element/code/QtCodeSnippet.cpp
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef QT_COREAPPLICTION_H
#define QT_COREAPPLICTION_H
#ifndef QT_COREAPPLICATION_H
#define QT_COREAPPLICATION_H
#include <QCoreApplication>
+1 -1
View File
@@ -34,7 +34,7 @@ void QtTabBar::contextMenuEvent(QContextMenuEvent* event)
menu.addAction(m_closeTabsToRight);
connect(m_closeTabsToRight, &QAction::triggered, this, [&]() {
// We dont want to close tabs right of the current active tab.
// We don't want to close tabs right of the current active tab.
// No, our intend is to close tabs right of the currently hovered tab.
auto tabNum = tabAt(event->pos());
LOG_INFO(
+1 -1
View File
@@ -824,7 +824,7 @@ void QtCodeArea::mouseReleaseEvent(QMouseEvent* event)
viewport()->setCursor(Qt::ArrowCursor);
const int panningThreshold = 5;
if (m_panningDistance < panningThreshold) // dont do anything if mouse is release to end
if (m_panningDistance < panningThreshold) // don't do anything if mouse is release to end
// some real panning action.
{
if (Qt::KeyboardModifier::ControlModifier & QApplication::keyboardModifiers())
+3 -3
View File
@@ -7,7 +7,7 @@
#include <QScrollArea>
#include "CodeSnippetParams.h"
#include "QtCodeNavigateable.h"
#include "QtCodeNavigable.h"
#include "QtScrollSpeedChangeListener.h"
class QtCodeFile;
@@ -23,7 +23,7 @@ protected:
class QtCodeFileList
: public QFrame
, public QtCodeNavigateable
, public QtCodeNavigable
{
Q_OBJECT
@@ -38,7 +38,7 @@ public:
void addFile(const CodeFileParams& params);
// QtCodeNavigatebale implementation
// QtCodeNavigable implementation
QScrollArea* getScrollArea() override;
void updateSourceLocations(const CodeSnippetParams& params) override;
@@ -9,7 +9,7 @@
#include "FilePath.h"
#include "TimeStamp.h"
#include "QtCodeNavigateable.h"
#include "QtCodeNavigable.h"
class QLabel;
class QPushButton;
@@ -19,7 +19,7 @@ class QtCodeNavigator;
class QtCodeFileSingle
: public QFrame
, public QtCodeNavigateable
, public QtCodeNavigable
{
Q_OBJECT
@@ -32,7 +32,7 @@ public:
bool addFile(const CodeFileParams& params, bool useSingleFileCache);
// QtCodeNavigateable implementation
// QtCodeNavigable implementation
QAbstractScrollArea* getScrollArea() override;
void updateSourceLocations(const CodeSnippetParams& params) override;
@@ -1,4 +1,4 @@
#include "QtCodeNavigateable.h"
#include "QtCodeNavigable.h"
#include <QPropertyAnimation>
#include <QScrollArea>
@@ -6,9 +6,9 @@
#include "ApplicationSettings.h"
QtCodeNavigateable::~QtCodeNavigateable() {}
QtCodeNavigable::~QtCodeNavigable() {}
void QtCodeNavigateable::ensureWidgetVisibleAnimated(
void QtCodeNavigable::ensureWidgetVisibleAnimated(
const QWidget* parentWidget,
const QWidget* childWidget,
const QRectF& rect,
@@ -96,7 +96,7 @@ void QtCodeNavigateable::ensureWidgetVisibleAnimated(
}
}
void QtCodeNavigateable::ensurePercentVisibleAnimated(
void QtCodeNavigable::ensurePercentVisibleAnimated(
double percentA, double percentB, bool animated, CodeScrollParams::Target target)
{
QAbstractScrollArea* area = getScrollArea();
@@ -186,7 +186,7 @@ void QtCodeNavigateable::ensurePercentVisibleAnimated(
}
}
QRect QtCodeNavigateable::getFocusRectForWidget(
QRect QtCodeNavigable::getFocusRectForWidget(
const QWidget* childWidget, const QWidget* parentWidget) const
{
const QRect microFocus = childWidget->inputMethodQuery(Qt::ImCursorRectangle).toRect();
@@ -1,5 +1,5 @@
#ifndef QT_CODE_NAVIGATEABLE_H
#define QT_CODE_NAVIGATEABLE_H
#ifndef QT_CODE_NAVIGABLE_H
#define QT_CODE_NAVIGABLE_H
#include <set>
@@ -15,10 +15,10 @@ class QRect;
class QtCodeArea;
class QWidget;
class QtCodeNavigateable
class QtCodeNavigable
{
public:
virtual ~QtCodeNavigateable();
virtual ~QtCodeNavigable();
virtual QAbstractScrollArea* getScrollArea() = 0;
@@ -59,4 +59,4 @@ protected:
QRect getFocusRectForWidget(const QWidget* childWidget, const QWidget* parentWidget) const;
};
#endif // QT_CODE_NAVIGATEABLE_H
#endif // QT_CODE_NAVIGABLE_H
@@ -133,7 +133,7 @@ private:
QtThreadedLambdaFunctor m_onQtThread;
QtCodeNavigateable* m_current;
QtCodeNavigable* m_current;
QtCodeFileList* m_list;
QtCodeFileSingle* m_single;
+1 -1
View File
@@ -40,7 +40,7 @@ void QtRequest::finished(QNetworkReply* reply)
if (reply->error() != QNetworkReply::NoError)
{
LOG_ERROR_STREAM(<< "An error occured during http request. ERRORCODE: " << reply->error());
LOG_ERROR_STREAM(<< "An error occurred during http request. ERRORCODE: " << reply->error());
}
QByteArray bytes = reply->readAll();
@@ -251,7 +251,7 @@ void QtProjectWizardContentPreferences::populate(QGridLayout* layout, int& row)
QStringLiteral(
"<p>Enable additional logs of abstract syntax tree traversal during indexing. This "
"information can help "
"tracking down crashes that occurr during indexing.</p>"
"tracking down crashes that occur during indexing.</p>"
"<p><b>Warning</b>: This slows down indexing performance a lot.</p>"),
layout,
row);
@@ -333,7 +333,7 @@ void QtProjectWizardContentPreferences::populate(QGridLayout* layout, int& row)
QStringLiteral("Run C/C++ indexer threads in different process"),
QStringLiteral(
"<p>Enable C/C++ indexer threads to run in different process.</p>"
"<p>This prevents the application from crashing due to unforseen exceptions while "
"<p>This prevents the application from crashing due to unforeseen exceptions while "
"indexing.</p>"),
layout,
row);
@@ -166,7 +166,7 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row)
selectedLanguage = LanguageType(languageTypeInt);
}
bool hasRecommeded = false;
bool hasRecommended = false;
for (auto& it: m_buttons)
{
it.second->setExclusive(false);
@@ -177,7 +177,7 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row)
if (it.first == selectedLanguage)
{
hasRecommeded = hasRecommeded | button->property("recommended").toBool();
hasRecommended = hasRecommended | button->property("recommended").toBool();
}
}
it.second->setExclusive(true);
@@ -187,7 +187,7 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row)
m_title->setText("Source Group Types - " + m_languages->checkedButton()->text());
m_description->setText(
hasRecommeded ? QStringLiteral("<b>* recommended</b>") : QLatin1String(""));
hasRecommended ? QStringLiteral("<b>* recommended</b>") : QLatin1String(""));
});
QtFlowLayout* flayout = new QtFlowLayout(10, 0, 0);
@@ -23,7 +23,7 @@ void QtProjectWizardContentUnloadable::populate(QGridLayout* layout, int& row)
QLabel* infoLabel = new QLabel(QString::fromStdString(
"<p>The type \"" + m_settings->getTypeString() +
"\" of the selected Source Group is not supportetd by this version of Sourcetrail.</p>"));
"\" of the selected Source Group is not supported by this version of Sourcetrail.</p>"));
infoLabel->setObjectName(QStringLiteral("info"));
infoLabel->setWordWrap(true);
layoutHorz->addWidget(infoLabel);
@@ -76,16 +76,16 @@ void QtProjectWizardContentPathsHeaderSearch::populate(QGridLayout* layout, int&
detectionButton, row, QtProjectWizardWindow::BACK_COL, Qt::AlignLeft | Qt::AlignTop);
}
{
QPushButton* validateionButton = new QPushButton(
QPushButton* validationButton = new QPushButton(
QStringLiteral("validate include directives"));
validateionButton->setObjectName(QStringLiteral("windowButton"));
validationButton->setObjectName(QStringLiteral("windowButton"));
connect(
validateionButton,
validationButton,
&QPushButton::clicked,
this,
&QtProjectWizardContentPathsHeaderSearch::validateIncludesButtonClicked);
layout->addWidget(
validateionButton, row, QtProjectWizardWindow::BACK_COL, Qt::AlignRight | Qt::AlignTop);
validationButton, row, QtProjectWizardWindow::BACK_COL, Qt::AlignRight | Qt::AlignTop);
}
row++;
}
@@ -79,7 +79,7 @@ bool QtProjectWizardContentPathsHeaderSearchGlobal::check()
"Your Global Include Paths contain other paths that hold C/C++ compiler headers, "
"probably those of your local C/C++ compiler. They are possibly in conflict with the "
"compiler headers of "
"Sourcetrail's C/C++ indexer. This can lead to compatiblity errors during indexing. Do "
"Sourcetrail's C/C++ indexer. This can lead to compatibility errors during indexing. Do "
"you want to remove "
"these paths?");
msgBox.setDetailedText(compilerHeaderPaths);
+1 -1
View File
@@ -100,7 +100,7 @@ void QtHighlighter::loadHighlightingRules()
if (doc.isNull() || !doc.isArray())
{
LOG_ERROR_STREAM(
<< "Highlinghting rules in \"" << path.str()
<< "Highlighting rules in \"" << path.str()
<< "\" couldn't be parsed as JSON: "
"offset "
<< error.offset << " - " << error.errorString().toStdString());
+1 -1
View File
@@ -15,7 +15,7 @@ QWidget* QtViewWidgetWrapper::getWidgetOfView(const View* view)
if (!widgetWrapper->getWidget())
{
LOG_ERROR("The QtViewWidgetWrapper is not holdling a QWidget.");
LOG_ERROR("The QtViewWidgetWrapper is not holding a QWidget.");
return nullptr;
}
@@ -37,12 +37,12 @@ void QtKeyboardShortcuts::populateWindow(QWidget* widget)
{
QVBoxLayout* layout = new QVBoxLayout(widget);
QLabel* generelLabel = new QLabel(this);
generelLabel->setObjectName(QStringLiteral("general_label"));
generelLabel->setText(QStringLiteral("General Shortcuts"));
layout->addWidget(generelLabel);
QLabel* generalLabel = new QLabel(this);
generalLabel->setObjectName(QStringLiteral("general_label"));
generalLabel->setText(QStringLiteral("General Shortcuts"));
layout->addWidget(generalLabel);
layout->addWidget(createGenerelShortcutsTable());
layout->addWidget(createGeneralShortcutsTable());
layout->addSpacing(20);
@@ -147,7 +147,7 @@ void QtKeyboardShortcuts::addShortcuts(QtShortcutTable* table, const std::vector
table->updateSize();
}
QTableWidget* QtKeyboardShortcuts::createGenerelShortcutsTable()
QTableWidget* QtKeyboardShortcuts::createGeneralShortcutsTable()
{
QtShortcutTable* table = createTableWidget("table_general");
+1 -1
View File
@@ -48,7 +48,7 @@ private:
QtShortcutTable* createTableWidget(const std::string& objectName);
void addShortcuts(QtShortcutTable* table, const std::vector<Shortcut>& shortcuts) const;
QTableWidget* createGenerelShortcutsTable();
QTableWidget* createGeneralShortcutsTable();
QTableWidget* createCodeViewShortcutsTable();
QTableWidget* createGraphViewShortcutsTable();
};
+1 -1
View File
@@ -49,7 +49,7 @@ void QtLicenseWindow::populateWindow(QWidget* widget)
QLabel* header3rdParties = new QLabel(QStringLiteral(
"<b>Copyrights and Licenses for Third Party Software Distributed with Sourcetrail:</b><br "
"/>"
"Sourcetaril contains code written by the following third parties that have <br />"
"Sourcetrail contains code written by the following third parties that have <br />"
"additional or alternate copyrights, licenses, and/or restrictions:"));
layout->addWidget(header3rdParties);
+1 -1
View File
@@ -146,7 +146,7 @@ QtMainWindow::QtMainWindow()
setupHelpMenu();
// Need to call loadLayout here for right DockWidget size on Linux
// Seconde call is in Application.cpp
// Second call is in Application.cpp
loadLayout();
}
@@ -98,7 +98,7 @@ FilePath CxxVs10To14HeaderPathDetector::getVsInstallPathUsingRegistry() const
FilePath path(value.toStdWString());
if (path.exists())
{
LOG_INFO(L"Found working regestry key for VS install path: " + key.toStdWString());
LOG_INFO(L"Found working registry key for VS install path: " + key.toStdWString());
return path;
}
@@ -79,7 +79,7 @@ void JavaEnvironmentFactory::createInstance(std::string classPath, std::string&
{
if (rc == JNI_EVERSION)
{
errorString = "JVM is oudated and doesn't meet requirements";
errorString = "JVM is outdated and doesn't meet requirements";
}
else if (rc == JNI_ENOMEM)
{
+1 -1
View File
@@ -49,7 +49,7 @@ private:
const std::string& classPath,
std::shared_ptr<TextAccess> textAccess);
// This macro makes available a variable T, the passed-in t. blablabla TODO: write somethign real here
// This macro makes available a variable T, the passed-in t. blablabla TODO: write something real here
#define MAKE_PARAMS_0()
#define MAKE_PARAMS_1(t1) , t1 arg1
#define MAKE_PARAMS_2(t1, t2) , t1 arg1, t2 arg2
+6 -6
View File
@@ -844,7 +844,7 @@ TEST_CASE("cxx parser finds template argument of dependent non type template par
// TS_ASSERT(utility::containsElement<std::wstring>(
// client->typeUses, // TODO: record edge between vector<int, Alloc<int>> and Alloc<int> (this
// is an issue because we dont have any typeloc for this edge -.-
// is an issue because we don't have any typeloc for this edge -.-
// ));
//}
@@ -2785,7 +2785,7 @@ TEST_CASE(
TEST_CASE(
"cxx parser finds type template argument in non default constructor of explicit template "
"instaitiation")
"instantiation")
{
std::shared_ptr<TestStorage> client = parseCode(
"template <typename T>\n"
@@ -2808,7 +2808,7 @@ TEST_CASE(
TEST_CASE(
"cxx parser finds type template argument in default constructor of explicit template "
"instaitiation")
"instantiation")
{
std::shared_ptr<TestStorage> client = parseCode(
"template <typename T>\n"
@@ -2830,7 +2830,7 @@ TEST_CASE(
}
TEST_CASE(
"cxx parser finds type template argument in new expression of explicit template instaitiation")
"cxx parser finds type template argument in new expression of explicit template instantiation")
{
std::shared_ptr<TestStorage> client = parseCode(
"template <typename T>\n"
@@ -4192,8 +4192,8 @@ TEST_CASE("cxx parser finds correct error location after line directive")
TEST_CASE("cxx parser catches error in macro expansion")
{
std::shared_ptr<TestStorage> client = parseCode(
"#define MACRO_WITH_NONEXISTING_PATH \"this_path_does_not_exist.txt\"\n"
"#include MACRO_WITH_NONEXISTING_PATH\n");
"#define MACRO_WITH_NONEXISTENT_PATH \"this_path_does_not_exist.txt\"\n"
"#include MACRO_WITH_NONEXISTENT_PATH\n");
REQUIRE(utility::containsElement<std::wstring>(
client->errors, L"'this_path_does_not_exist.txt' file not found <2:10 2:10>"));
+2 -2
View File
@@ -195,7 +195,7 @@ TEST_CASE("file_path_differs_for_different_existing_files")
REQUIRE(pathA != pathB);
}
TEST_CASE("file_path_differs_for_different_nonexisting_files")
TEST_CASE("file_path_differs_for_different_nonexistent_files")
{
const FilePath pathA(L"data/FilePathTestSuite/a.h");
const FilePath pathB(L"data/FilePathTestSuite/b.c");
@@ -203,7 +203,7 @@ TEST_CASE("file_path_differs_for_different_nonexisting_files")
REQUIRE(pathA != pathB);
}
TEST_CASE("file_path_differs_for_existing_and_nonexisting_files")
TEST_CASE("file_path_differs_for_existing_and_nonexistent_files")
{
const FilePath pathA(L"data/FilePathTestSuite/a.h");
const FilePath pathB(L"data/FilePathTestSuite/b.cc");
+1 -1
View File
@@ -8,7 +8,7 @@ namespace
* C++ functions can't return statically allocated arrays.
* I don't want to use dynamically allocated arrays, so here's my work around for that...
*
* Update: acutally they can... see MatrixBase [] operator (in MatrixBase.cpp)
* Update: actually they can... see MatrixBase [] operator (in MatrixBase.cpp)
*/
template <class T>
struct Array3x5
+1 -1
View File
@@ -8,7 +8,7 @@ TEST_CASE("parse message")
{
std::wstring type = L"setActiveToken";
std::wstring divider = L">>";
std::wstring filePath = L"C:/Users/Manuel/imporant/file/location/fileName.cpp";
std::wstring filePath = L"C:/Users/Manuel/important/file/location/fileName.cpp";
std::wstring endOfMessageToken = L"<EOM>";
int row = 1;
int column = 2;
+3 -3
View File
@@ -343,7 +343,7 @@ TEST_CASE("refresh info for updated files is empty for empty storage and empty s
// file may be a source file sourcefile / headerfile
// file may now be indexed by the source group nottoindex / toindex
//
// We now wite a TEST_CASE that checks for the expected result for every possible combination.
// We now write a TEST_CASE that checks for the expected result for every possible combination.
// Example: test_unknown_unchanged_sourcefile_that_is_nottoindex
namespace
{
@@ -571,7 +571,7 @@ TEST_CASE("nonindexed changed headerfile that is nottoindex")
const RefreshInfo refreshInfo = getRefreshInfo(NON_INDEXED, CHANGED, HEADER_FILE, NOT_TO_INDEX);
REQUIRE(REFRESH_UPDATED_FILES == refreshInfo.mode);
REQUIRE(1 == refreshInfo.nonIndexedFilesToClear.size());
; // must be cleard here and will be re-indexed on demand
; // must be cleared here and will be re-indexed on demand
REQUIRE(0 == refreshInfo.filesToClear.size());
REQUIRE(0 == refreshInfo.filesToIndex.size());
}
@@ -848,7 +848,7 @@ TEST_CASE("refresh info for updated files does not clear unknown uptodate header
}
TEST_CASE(
"refresh info for updated files clears outdated source file and referened uptodate header file")
"refresh info for updated files clears outdated source file and referenced uptodate header file")
{
cleanup();
{
+14 -14
View File
@@ -60,15 +60,15 @@ TEST_CASE("storage saves file")
std::wstring filePath = L"path/to/test.h";
std::shared_ptr<IntermediateStorage> intermetiateStorage = std::make_shared<IntermediateStorage>();
Id id = intermetiateStorage
std::shared_ptr<IntermediateStorage> intermediateStorage = std::make_shared<IntermediateStorage>();
Id id = intermediateStorage
->addNode(StorageNodeData(
nodeKindToInt(NODE_FILE),
NameHierarchy::serialize(NameHierarchy(filePath, NAME_DELIMITER_FILE))))
.first;
intermetiateStorage->addFile(StorageFile(id, filePath, L"someLanguage", "someTime", true, true));
intermediateStorage->addFile(StorageFile(id, filePath, L"someLanguage", "someTime", true, true));
storage.inject(intermetiateStorage.get());
storage.inject(intermediateStorage.get());
REQUIRE(storage.getNameHierarchyForNodeId(id).getQualifiedName() == filePath);
REQUIRE(storage.getNodeTypeForNodeWithId(id).isFile());
@@ -80,11 +80,11 @@ TEST_CASE("storage saves node")
TestStorage storage;
std::shared_ptr<IntermediateStorage> intermetiateStorage = std::make_shared<IntermediateStorage>();
intermetiateStorage->addNode(
std::shared_ptr<IntermediateStorage> intermediateStorage = std::make_shared<IntermediateStorage>();
intermediateStorage->addNode(
StorageNodeData(nodeKindToInt(NODE_TYPEDEF), NameHierarchy::serialize(a)));
storage.inject(intermetiateStorage.get());
storage.inject(intermediateStorage.get());
Id storedId = storage.getNodeIdForNameHierarchy(a);
@@ -99,20 +99,20 @@ TEST_CASE("storage saves field as member")
TestStorage storage;
std::shared_ptr<IntermediateStorage> intermetiateStorage = std::make_shared<IntermediateStorage>();
std::shared_ptr<IntermediateStorage> intermediateStorage = std::make_shared<IntermediateStorage>();
Id aId = intermetiateStorage
Id aId = intermediateStorage
->addNode(StorageNodeData(nodeKindToInt(NODE_STRUCT), NameHierarchy::serialize(a)))
.first;
intermetiateStorage->addSymbol(StorageSymbol(aId, DEFINITION_EXPLICIT));
intermediateStorage->addSymbol(StorageSymbol(aId, DEFINITION_EXPLICIT));
Id bId = intermetiateStorage
Id bId = intermediateStorage
->addNode(StorageNodeData(nodeKindToInt(NODE_FIELD), NameHierarchy::serialize(b)))
.first;
intermetiateStorage->addSymbol(StorageSymbol(bId, DEFINITION_EXPLICIT));
intermetiateStorage->addEdge(StorageEdgeData(Edge::typeToInt(Edge::EDGE_MEMBER), aId, bId));
intermediateStorage->addSymbol(StorageSymbol(bId, DEFINITION_EXPLICIT));
intermediateStorage->addEdge(StorageEdgeData(Edge::typeToInt(Edge::EDGE_MEMBER), aId, bId));
storage.inject(intermetiateStorage.get());
storage.inject(intermediateStorage.get());
bool foundEdge = false;
const Id sourceId = storage.getNodeIdForNameHierarchy(a);
+8 -8
View File
@@ -13,10 +13,10 @@ namespace
{
void executeTask(Task& task)
{
std::shared_ptr<Blackboard> blakboard = std::make_shared<Blackboard>();
std::shared_ptr<Blackboard> blackboard = std::make_shared<Blackboard>();
while (true)
{
if (task.update(blakboard) != Task::STATE_RUNNING)
if (task.update(blackboard) != Task::STATE_RUNNING)
{
return;
}
@@ -37,12 +37,12 @@ public:
{
}
virtual void doEnter(std::shared_ptr<Blackboard> blakboard)
virtual void doEnter(std::shared_ptr<Blackboard> blackboard)
{
enterCallOrder = ++orderCount;
}
virtual TaskState doUpdate(std::shared_ptr<Blackboard> blakboard)
virtual TaskState doUpdate(std::shared_ptr<Blackboard> blackboard)
{
updateCallOrder = ++orderCount;
@@ -61,12 +61,12 @@ public:
return returnState;
}
virtual void doExit(std::shared_ptr<Blackboard> blakboard)
virtual void doExit(std::shared_ptr<Blackboard> blackboard)
{
exitCallOrder = ++orderCount;
}
virtual void doReset(std::shared_ptr<Blackboard> blakboard)
virtual void doReset(std::shared_ptr<Blackboard> blackboard)
{
resetCallOrder = ++orderCount;
}
@@ -89,12 +89,12 @@ public:
{
}
virtual TaskState doUpdate(std::shared_ptr<Blackboard> blakboard)
virtual TaskState doUpdate(std::shared_ptr<Blackboard> blackboard)
{
subTask = std::make_shared<TestTask>(&orderCount, 1);
scheduler->pushTask(subTask);
return TestTask::doUpdate(blakboard);
return TestTask::doUpdate(blackboard);
}
TaskScheduler* scheduler;
+1 -1
View File
@@ -138,7 +138,7 @@ TEST_CASE("textAccessFile lines content")
REQUIRE(
lines[3] ==
"... \"What? Harmless! Is that all it's got to say? Harmless! One word! ... Well, for "
"God's sake I hope you managed to recitify that a bit.\"\n");
"God's sake I hope you managed to rectify that a bit.\"\n");
}
TEST_CASE("textAccessFile get filePath")
+9 -9
View File
@@ -153,17 +153,17 @@ TEST_CASE("tokenize with deque")
REQUIRE(result.at(6) == "D");
}
TEST_CASE("substr before first with single delimiter occurence")
TEST_CASE("substr before first with single delimiter occurrence")
{
REQUIRE(utility::substrBeforeFirst("foo bar", ' ') == "foo");
}
TEST_CASE("substr before first with multiple delimiter occurences")
TEST_CASE("substr before first with multiple delimiter occurrences")
{
REQUIRE(utility::substrBeforeFirst("foo bar foo", ' ') == "foo");
}
TEST_CASE("substr before first with no delimiter occurence")
TEST_CASE("substr before first with no delimiter occurrence")
{
REQUIRE(utility::substrBeforeFirst("foobar", ' ') == "foobar");
}
@@ -178,17 +178,17 @@ TEST_CASE("substr before first with delimiter at end")
REQUIRE(utility::substrBeforeFirst("foobar ", ' ') == "foobar");
}
TEST_CASE("substr before last with single delimiter occurence")
TEST_CASE("substr before last with single delimiter occurrence")
{
REQUIRE(utility::substrBeforeLast("foo bar", ' ') == "foo");
}
TEST_CASE("substr before last with multiple delimiter occurences")
TEST_CASE("substr before last with multiple delimiter occurrences")
{
REQUIRE(utility::substrBeforeLast("foo bar foo", ' ') == "foo bar");
}
TEST_CASE("substr before last with no delimiter occurence")
TEST_CASE("substr before last with no delimiter occurrence")
{
REQUIRE(utility::substrBeforeLast("foobar", ' ') == "foobar");
}
@@ -203,17 +203,17 @@ TEST_CASE("substr before last with delimiter at end")
REQUIRE(utility::substrBeforeLast("foobar ", ' ') == "foobar");
}
TEST_CASE("substr after with single delimiter occurence")
TEST_CASE("substr after with single delimiter occurrence")
{
REQUIRE(utility::substrAfter("foo bar", ' ') == "bar");
}
TEST_CASE("substr after with multiple delimiter occurences")
TEST_CASE("substr after with multiple delimiter occurrences")
{
REQUIRE(utility::substrAfter("foo bar foo", ' ') == "bar foo");
}
TEST_CASE("substr after with no delimiter occurence")
TEST_CASE("substr after with no delimiter occurrence")
{
REQUIRE(utility::substrAfter("foobar", ' ') == "foobar");
}
+2 -2
View File
@@ -37,9 +37,9 @@ public:
}
std::multimap<Id, Id> occurrenceMap;
for (const StorageOccurrence& occurence: storage->getStorageOccurrences())
for (const StorageOccurrence& occurrence: storage->getStorageOccurrences())
{
occurrenceMap.emplace(occurence.sourceLocationId, occurence.elementId);
occurrenceMap.emplace(occurrence.sourceLocationId, occurrence.elementId);
}
std::multimap<Id, StorageSourceLocation> tokenLocationMap;