diff --git a/application/5.build_installation_package.sh b/application/5.build_installation_package.sh index bd5d2edc..a5b9eee0 100755 --- a/application/5.build_installation_package.sh +++ b/application/5.build_installation_package.sh @@ -9,7 +9,7 @@ if [ `uname -s` = "Linux" ] ; then ./linux_ubuntu_setup.sh cd ../.. else - # MS.Windows. Inno Setup (isetup) + QuickStart Pack (ispack) must be both installed. The Inno Setup directory must be placed in the PATH variable environnment. + # MS.Windows. Inno Setup (isetup) + QuickStart Pack (ispack) must be both installed. The Inno Setup directory must be placed in the PATH variable environment. cd Setups/Windows/ iscc windows_setup.iss cd ../.. diff --git a/application/Client/D-LAN_Client.cpp b/application/Client/D-LAN_Client.cpp index e45dcf0e..5f73a613 100644 --- a/application/Client/D-LAN_Client.cpp +++ b/application/Client/D-LAN_Client.cpp @@ -102,7 +102,7 @@ void D_LAN_Client::newCommandLine(QString line) } else { - this->out << "Unkown command, type help for more information" << endl; + this->out << "Unknown command, type help for more information" << endl; } } diff --git a/application/Common/Constants.cpp b/application/Common/Constants.cpp index ce7857db..04fb6d80 100644 --- a/application/Common/Constants.cpp +++ b/application/Common/Constants.cpp @@ -55,7 +55,7 @@ const QString Constants::SERVICE_NAME("D-LAN Core"); const int Constants::PROTOBUF_STREAMING_BUFFER_SIZE(4 * 1024); ///< 4kB. -const QString Constants::BINARY_PREFIXS[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB"}; +const QString Constants::BINARY_PREFIXES[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB"}; const int Constants::MAX_NB_HASHES_PER_ENTRY_GUI_BROWSE = 8; diff --git a/application/Common/Constants.h b/application/Common/Constants.h index 532fed1b..bb755f0a 100644 --- a/application/Common/Constants.h +++ b/application/Common/Constants.h @@ -54,7 +54,7 @@ namespace Common static const int PROTOBUF_STREAMING_BUFFER_SIZE; - static const QString BINARY_PREFIXS[]; + static const QString BINARY_PREFIXES[]; static const int MAX_NB_HASHES_PER_ENTRY_GUI_BROWSE; static const int CHUNK_SIZE; diff --git a/application/Common/Containers/SortedArray.h b/application/Common/Containers/SortedArray.h index 2ab157c0..8049e873 100644 --- a/application/Common/Containers/SortedArray.h +++ b/application/Common/Containers/SortedArray.h @@ -277,7 +277,7 @@ int Common::SortedArray::size() const } /** - * Insert or update the given value. The update is done with assignement operator of T. + * Insert or update the given value. The update is done with assignment operator of T. * @param exists Optional, set to 'true' if the value already exists. * @return The position 'value'. */ diff --git a/application/Common/Containers/SortedList.h b/application/Common/Containers/SortedList.h index 91e7e664..09e4ccc8 100644 --- a/application/Common/Containers/SortedList.h +++ b/application/Common/Containers/SortedList.h @@ -25,7 +25,7 @@ /** * @class Common::SortedList * - * A very simple sorted list, not very efficent, implemented as a simple linked list. A more efficient implementation should use a red-black tree or a B-tree. + * A very simple sorted list, not very efficient, implemented as a simple linked list. A more efficient implementation should use a red-black tree or a B-tree. * Don't forget to call 'itemChanged(..)' if the data of one of the items has changed and the sorting function ('lesserThan') depends of this data. * Do not allow multiple same item. */ diff --git a/application/Common/Containers/Tree.h b/application/Common/Containers/Tree.h index 3fe3f663..fb0bb20a 100644 --- a/application/Common/Containers/Tree.h +++ b/application/Common/Containers/Tree.h @@ -41,13 +41,13 @@ namespace Common /** * @class Tree * A tree data structure, can store data called 'item' of type 'ItemType'. - * To use this classe you have to inherit it and give your child class type as the second template parameter. + * To use this class you have to inherit it and give your child class type as the second template parameter. * For example: * MyTree : public Tree { .. }; * * Some remarks: * - To remove an element just delete it. - * - You can reimplement 'newTree(..)' to dynamically create new type of children. + * - You can re-implement 'newTree(..)' to dynamically create new type of children. * - This class comes with a breadth-first and a depth-first iterators. * * If you don't want to inherit from Tree you can use the 'SimpleTree' class. diff --git a/application/Common/Global.cpp b/application/Common/Global.cpp index f6a20134..4138a192 100644 --- a/application/Common/Global.cpp +++ b/application/Common/Global.cpp @@ -217,11 +217,11 @@ int Global::nCombinations(int n, int k) else bytes = 0; - return QString::number(bytes).append(IS_BELOW_1024 ? "" : QString(".").append(QString::number(rest))).append(" ").append(Constants::BINARY_PREFIXS[current]); + return QString::number(bytes).append(IS_BELOW_1024 ? "" : QString(".").append(QString::number(rest))).append(" ").append(Constants::BINARY_PREFIXES[current]); }*/ /** - * Will return a formated size with the unit prefix and one digit folowing the point. + * Will return a formatted size with the unit prefix and one digit following the point. * For example: * - 1 -> "1 B" * - 1024 -> "1.0 KiB" @@ -229,7 +229,7 @@ int Global::nCombinations(int n, int k) * - 1024^3 -> "1.0 GiB" * - 1024^4 -> "1.0 TiB" * - etc . . . to ZiB - * The speed of this implementation is equal to the old above : ~1 µs per call (mesured with 1 millions calls in release (-O2)). + * The speed of this implementation is equal to the old above : ~1 µs per call (measured with 1 millions calls in release (-O2)). */ QString Global::formatByteSize(qint64 bytes, int precision) { @@ -243,8 +243,8 @@ QString Global::formatByteSize(qint64 bytes, int precision) if (bytes < 1024 * size) return bytes < 1024 ? - QString::number(bytes <= 0 ? 0 : bytes).append(" ").append(Constants::BINARY_PREFIXS[i]) : - QString::number((double)bytes / size, 'f', precision).append(" ").append(Constants::BINARY_PREFIXS[i]); + QString::number(bytes <= 0 ? 0 : bytes).append(" ").append(Constants::BINARY_PREFIXES[i]) : + QString::number((double)bytes / size, 'f', precision).append(" ").append(Constants::BINARY_PREFIXES[i]); } return QString(); } @@ -291,13 +291,13 @@ QString Global::formatTime(quint64 seconds) QString Global::formatIP(const QHostAddress& address, quint16 port) { - QString formatedIP; + QString formattedIP; if (address.protocol() == QAbstractSocket::IPv4Protocol) - formatedIP.append(address.toString()); + formattedIP.append(address.toString()); else - formatedIP.append("[").append(address.toString()).append("]"); - formatedIP.append(":").append(QString::number(port)); - return formatedIP; + formattedIP.append("[").append(address.toString()).append("]"); + formattedIP.append(":").append(QString::number(port)); + return formattedIP; } /** @@ -469,7 +469,7 @@ QString Global::getDataSystemFolder(DataFolderType type) #endif } -QString Global::getCurrenUserName() +QString Global::getCurrentUserName() { #if defined(Q_OS_WIN32) TCHAR userName[UNLEN + 1]; // UNLEN is from Lmcons.h @@ -487,7 +487,7 @@ QString Global::getCurrenUserName() #endif } -QString Global::getCurrenMachineName() +QString Global::getCurrentMachineName() { #if defined(Q_OS_WIN32) TCHAR machineName[MAX_COMPUTERNAME_LENGTH + 1]; @@ -507,7 +507,7 @@ QString Global::getCurrenMachineName() /** * Create a file containing its name. Parents directories are created if needed. * For testing purpose. - * @return true if the file has been created successfuly or false if an error has occured. + * @return true if the file has been created successfully or false if an error has occurred. */ bool Global::createFile(const QString& path) { diff --git a/application/Common/Global.h b/application/Common/Global.h index d977a018..5cdde7f5 100644 --- a/application/Common/Global.h +++ b/application/Common/Global.h @@ -77,8 +77,8 @@ namespace Common static QString getDataServiceFolder(DataFolderType type); static QString getDataSystemFolder(DataFolderType type); - static QString getCurrenUserName(); - static QString getCurrenMachineName(); + static QString getCurrentUserName(); + static QString getCurrentMachineName(); static bool createFile(const QString& path); static bool recursiveDeleteDirectoryContent(const QString& dir); diff --git a/application/Common/Hash_noShare.cpp b/application/Common/Hash_noShare.cpp index 7a131856..d3439cdb 100644 --- a/application/Common/Hash_noShare.cpp +++ b/application/Common/Hash_noShare.cpp @@ -40,8 +40,8 @@ Hash::Hash() noexcept : /** * Build a new hash from a char*, 'h' is not a readable string, @see fromStr. * 'h' must have a length equal or bigger to HASH_SIZE! - * The data are copied, no pointer is keept to 'h'. - * 'h' can be a null pointer, in this case a null hashe will be built. + * The data are copied, no pointer is kept to 'h'. + * 'h' can be a null pointer, in this case a null hash will be built. */ Hash::Hash(const char* h) { @@ -68,7 +68,7 @@ Hash::Hash(const std::string& str) /** * Build a new hash from a QByteArray. * 'a' must have a length equal or bigger to HASH_SIZE! - * The data are copied, no pointer is keept to 'a'. + * The data are copied, no pointer is kept to 'a'. */ Hash::Hash(const QByteArray& a) { diff --git a/application/Common/Hash_share.cpp b/application/Common/Hash_share.cpp index a4ee40d1..9bb5664f 100644 --- a/application/Common/Hash_share.cpp +++ b/application/Common/Hash_share.cpp @@ -62,8 +62,8 @@ Hash::Hash(Hash&& h) noexcept /** * Build a new hash from a char*, 'h' is not a readable string, @see fromStr. * 'h' must have a length equal or bigger to HASH_SIZE! - * The data are copied, no pointer is keept to 'h'. - * 'h' can be a null pointer, in this case a null hashe will be built. + * The data are copied, no pointer is kept to 'h'. + * 'h' can be a null pointer, in this case a null hash will be built. */ Hash::Hash(const char* h) { @@ -102,7 +102,7 @@ Hash::Hash(const std::string& str) /** * Build a new hash from a QByteArray. * 'a' must have a length equal or bigger to HASH_SIZE! - * The data are copied, no pointer is keept to 'a'. + * The data are copied, no pointer is kept to 'a'. */ Hash::Hash(const QByteArray& a) { diff --git a/application/Common/KnownExtensions.cpp b/application/Common/KnownExtensions.cpp index 0d2ab847..6aef64d2 100644 --- a/application/Common/KnownExtensions.cpp +++ b/application/Common/KnownExtensions.cpp @@ -28,7 +28,7 @@ ExtensionCategory KnownExtensions::getCategoryFrom(const QString& extension) return *i; } -int KnownExtensions::getBeginingExtension(const QString& filename) +int KnownExtensions::getBeginningExtension(const QString& filename) { int i = 0; while ((i = filename.indexOf('.', i + 1)) != -1) @@ -45,7 +45,7 @@ int KnownExtensions::getBeginingExtension(const QString& filename) QString KnownExtensions::removeExtension(const QString& filename) { - int i = getBeginingExtension(filename); + int i = getBeginningExtension(filename); if (i != -1) return filename.left(i - 1); else @@ -54,7 +54,7 @@ QString KnownExtensions::removeExtension(const QString& filename) QString KnownExtensions::getExtension(const QString& filename) { - int i = getBeginingExtension(filename); + int i = getBeginningExtension(filename); if (i != -1) return filename.right(filename.length() - i); else diff --git a/application/Common/KnownExtensions.h b/application/Common/KnownExtensions.h index 1ad2e37a..9b012075 100644 --- a/application/Common/KnownExtensions.h +++ b/application/Common/KnownExtensions.h @@ -32,7 +32,7 @@ namespace Common * Returns '-1' if there is no extension. * For example: "abc.zip" may return 4. */ - static int getBeginingExtension(const QString& filename); + static int getBeginningExtension(const QString& filename); static QString removeExtension(const QString& filename); static QString getExtension(const QString& filename); diff --git a/application/Common/LogManager/priv/Builder.cpp b/application/Common/LogManager/priv/Builder.cpp index eb3cae85..5e964f56 100644 --- a/application/Common/LogManager/priv/Builder.cpp +++ b/application/Common/LogManager/priv/Builder.cpp @@ -44,7 +44,7 @@ QSharedPointer Builder::newLogger(const QString& name) } /** - * Return an hook to grap all log message for the given severities. + * Return an hook to grep all log message for the given severities. */ QSharedPointer Builder::newLoggerHook(Severity severities) { diff --git a/application/Common/LogManager/priv/Entry.cpp b/application/Common/LogManager/priv/Entry.cpp index ed35c4a7..417e9027 100644 --- a/application/Common/LogManager/priv/Entry.cpp +++ b/application/Common/LogManager/priv/Entry.cpp @@ -26,7 +26,7 @@ using namespace LM; const QString Entry::DATE_TIME_FORMAT("yyyy-MM-dd HH:mm:ss"); const QString Entry::DATE_TIME_FORMAT_WITH_MS("yyyy-MM-dd HH:mm:ss.zzz"); -const QString Entry::SEVERITIES_STR[] = {"Fatal", "Error", "Warning", "Debug", "User", "Unkown"}; +const QString Entry::SEVERITIES_STR[] = {"Fatal", "Error", "Warning", "Debug", "User", "Unknown"}; QRegExp Entry::lineRegExp("(\\S{10} \\S{8})\\.(\\d{3}) \\[(.+)\\] \\{(.+)\\} \\((\\w+)\\) (?:<(\\S+:\\d+)> )?: (.*)"); Entry::Entry(const QString& line) : @@ -64,11 +64,11 @@ Entry::Entry(const QDateTime& dateTime, Severity severity, const QString& name, } /** - * Message endlines ('\n') are replaced by "" to guaranted one line per entry. + * Message endlines ('\n') are replaced by "" to guaranteed one line per entry. */ QString Entry::toStrLine() const { - QString formatedMessage = + QString formattedMessage = QString(!this->source.isNull() ? "%1 [%2] {%3} (%4) <%5> : %6" : "%1 [%2] {%3} (%4) : %5").arg ( this->getDateStr(), @@ -78,9 +78,9 @@ QString Entry::toStrLine() const ); if (!this->source.isNull()) - formatedMessage = formatedMessage.arg(this->source); + formattedMessage = formattedMessage.arg(this->source); - return formatedMessage.arg(this->message); + return formattedMessage.arg(this->message); } QDateTime Entry::getDate() const diff --git a/application/Common/LogManager/priv/Logger.cpp b/application/Common/LogManager/priv/Logger.cpp index 837bfbf5..c60b059e 100644 --- a/application/Common/LogManager/priv/Logger.cpp +++ b/application/Common/LogManager/priv/Logger.cpp @@ -78,7 +78,7 @@ void Logger::addALoggerHook(QSharedPointer loggerHook) } /** - * We can't use 'Logger::mutex' in constructor and destructor because we don't know if the object already exist (contructor) or + * We can't use 'Logger::mutex' in constructor and destructor because we don't know if the object already exist (constructor) or * if it has been already deleted (destructor). */ Logger::Logger(const QString& name) : diff --git a/application/Common/LogManager/priv/QtLogger.cpp b/application/Common/LogManager/priv/QtLogger.cpp index 9c9153ad..4f57f40a 100644 --- a/application/Common/LogManager/priv/QtLogger.cpp +++ b/application/Common/LogManager/priv/QtLogger.cpp @@ -26,10 +26,10 @@ using namespace LM; /** * @class LM::QtLogger * - * A special objet is create to handle all Qt message. For example + * A special object is create to handle all Qt message. For example * when a signal is connected to an unknown slot, the warning will be - * catched and logged here. - * Warning, the Qt messages are not catched during unit tesing because 'QTest::qExec(..)' + * caught and logged here. + * Warning, the Qt messages are not caught during unit testing because 'QTest::qExec(..)' * will create its own handle and discard the current one. */ diff --git a/application/Common/Network/MessageSocket.cpp b/application/Common/Network/MessageSocket.cpp index b1516fe7..b646e843 100644 --- a/application/Common/Network/MessageSocket.cpp +++ b/application/Common/Network/MessageSocket.cpp @@ -32,7 +32,7 @@ using namespace Common; * @class Common::MessageSocket * * An abstract class which is able to send and receive protocol buffer messages over a QAbstractSocket. - * It is designed to be sublcassed, + * It is designed to be subclassed, */ /** diff --git a/application/Common/PersistentData.cpp b/application/Common/PersistentData.cpp index c0c89828..93da1f56 100644 --- a/application/Common/PersistentData.cpp +++ b/application/Common/PersistentData.cpp @@ -63,7 +63,7 @@ void PersistentData::setValue(const QString& directory, const QString& name, con /** * Retrieve the data associated to a given name. * @exception PersistentDataIOException - * @exception UnknownValueException Throwed if the value doesn't exist + * @exception UnknownValueException Thrown if the value doesn't exist */ void PersistentData::getValue(const QString& name, google::protobuf::Message& data, Global::DataFolderType dataFolderType, bool humanReadable) { diff --git a/application/Common/RemoteCoreController/ICoreConnection.h b/application/Common/RemoteCoreController/ICoreConnection.h index debd9f32..1760d5d4 100644 --- a/application/Common/RemoteCoreController/ICoreConnection.h +++ b/application/Common/RemoteCoreController/ICoreConnection.h @@ -38,7 +38,7 @@ namespace RCC /** * The main interface to control a remote core. - * The signal 'newState' is periodically emitted, for exemple each second. It can be emitted right after certain action, like 'setCoreSettings(..)'. + * The signal 'newState' is periodically emitted, for example each second. It can be emitted right after certain action, like 'setCoreSettings(..)'. * See the prototype file "application/Protos/gui_protocol.proto" for more information. * * Connection process: @@ -92,7 +92,7 @@ namespace RCC /** * Connect to a remote core. Password is mendatory and should be hashed and salted, see the class 'Common::Hasher'. * If the given address is a local one it may try to launch a local core. - * @param address the IP adress, it can be an IPv4 or IPv6 address. + * @param address the IP address, it can be an IPv4 or IPv6 address. */ virtual void connectToCore(const QString& address, quint16 port, Common::Hash password) = 0; @@ -168,7 +168,7 @@ namespace RCC /** * Get files and folders from some folders. Plus the root folders if asked. * @param peerID Can be yourself. - * @param entries One or more folders frome the remote peer. + * @param entries One or more folders from the remote peer. * @param withRoots */ virtual QSharedPointer browse(const Common::Hash& peerID, const Protos::Common::Entries& entries, bool withRoots = true) = 0; diff --git a/application/Common/RemoteCoreController/priv/InternalCoreConnection.cpp b/application/Common/RemoteCoreController/priv/InternalCoreConnection.cpp index dd7849eb..1e26db64 100644 --- a/application/Common/RemoteCoreController/priv/InternalCoreConnection.cpp +++ b/application/Common/RemoteCoreController/priv/InternalCoreConnection.cpp @@ -90,7 +90,7 @@ void InternalCoreConnection::connectToCore(const QString& address, quint16 port, if (this->currentHostLookupID != -1) QHostInfo::abortHostLookup(this->currentHostLookupID); - this->currentHostLookupID = QHostInfo::lookupHost(this->connectionInfo.address, this, SLOT(adressResolved(QHostInfo))); + this->currentHostLookupID = QHostInfo::lookupHost(this->connectionInfo.address, this, SLOT(addressResolved(QHostInfo))); } void InternalCoreConnection::connectToCore(const QString& address, quint16 port, const QString& password) @@ -300,7 +300,7 @@ ICoreConnection::ConnectionInfo InternalCoreConnection::getConnectionInfo() cons return this->connectionInfo; } -void InternalCoreConnection::adressResolved(QHostInfo hostInfo) +void InternalCoreConnection::addressResolved(QHostInfo hostInfo) { this->currentHostLookupID = -1; diff --git a/application/Common/RemoteCoreController/priv/InternalCoreConnection.h b/application/Common/RemoteCoreController/priv/InternalCoreConnection.h index 9195ac6d..230bd3f9 100644 --- a/application/Common/RemoteCoreController/priv/InternalCoreConnection.h +++ b/application/Common/RemoteCoreController/priv/InternalCoreConnection.h @@ -112,7 +112,7 @@ namespace RCC void searchResult(const Protos::Common::FindResult& findResult); private slots: - void adressResolved(QHostInfo hostInfo); + void addressResolved(QHostInfo hostInfo); void tryToConnectToTheNextAddress(); void stateChanged(QAbstractSocket::SocketState socketState); @@ -135,7 +135,7 @@ namespace RCC int currentHostLookupID; - QList addressesToTry; // When a name is resolved many addresses can be returned, we will try all of them until a connection is successfuly established. + QList addressesToTry; // When a name is resolved many addresses can be returned, we will try all of them until a connection is successfully established. QList addressesToRetry; int nbRetries; diff --git a/application/Common/Settings.cpp b/application/Common/Settings.cpp index 847abebe..06e4cbc8 100644 --- a/application/Common/Settings.cpp +++ b/application/Common/Settings.cpp @@ -138,7 +138,7 @@ void Settings::remove() PersistentData::rmValue(this->filename, Common::Global::DataFolderType::ROAMING); } -bool Settings::saveToACutomDirectory(const QString& directory) const +bool Settings::saveToACustomDirectory(const QString& directory) const { QMutexLocker locker(&this->mutex); Q_ASSERT(this->settings); @@ -156,7 +156,7 @@ bool Settings::saveToACutomDirectory(const QString& directory) const } } -bool Settings::loadFromACutomDirectory(const QString& directory) +bool Settings::loadFromACustomDirectory(const QString& directory) { QMutexLocker locker(&this->mutex); diff --git a/application/Common/Settings.h b/application/Common/Settings.h index 58f9a57a..73678e2f 100644 --- a/application/Common/Settings.h +++ b/application/Common/Settings.h @@ -48,8 +48,8 @@ namespace Common bool load(); void remove(); - bool saveToACutomDirectory(const QString& directory) const; - bool loadFromACutomDirectory(const QString& directory); + bool saveToACustomDirectory(const QString& directory) const; + bool loadFromACustomDirectory(const QString& directory); void free(); diff --git a/application/Common/TestsCommon/Tests.cpp b/application/Common/TestsCommon/Tests.cpp index d0e925da..fc39a8ce 100644 --- a/application/Common/TestsCommon/Tests.cpp +++ b/application/Common/TestsCommon/Tests.cpp @@ -53,7 +53,7 @@ Tests::Tests() void Tests::initTestCase() { - QTest::qSleep(100); // If there is no delay when debugging, the debugger is not attached fast enough and some breackpoints are not triggered... very strange. + QTest::qSleep(100); // If there is no delay when debugging, the debugger is not attached fast enough and some breakpoints are not triggered... very strange. qDebug() << "Application directory path (where the settings and persistent data are put) : " << Global::getDataFolder(Common::Global::DataFolderType::ROAMING, false); } @@ -373,7 +373,7 @@ void Tests::sortedArray() } { - // Test other comparaison functions. + // Test other comparison functions. QList values { "albinos", "Andrew", "double", "David" }; QList res1 { "Andrew", "David", "albinos", "double" }; QList res2 { "albinos", "Andrew", "David", "double" }; @@ -501,7 +501,7 @@ void Tests::transferRateCalculator() QTest::qSleep(i); if (i < 600) t.addData(i); - qDebug() << "Transfert rate: " << t.getTransferRate(); + qDebug() << "Transfer rate: " << t.getTransferRate(); QVERIFY(t.getTransferRate() <= 1000); } @@ -532,11 +532,11 @@ void Tests::readPersistentData() } catch (UnknownValueException) { - qDebug() << "Ok, exception UnknownValueException catched for the value 'john'"; + qDebug() << "Ok, exception UnknownValueException caught for the value 'john'"; } catch (...) { - QFAIL("Unknown exception occured"); + QFAIL("Unknown exception occurred"); } } @@ -641,7 +641,7 @@ void Tests::compareTwoHash() QVERIFY(h2 == h4); } -void Tests::hashMoveConstuctorAndAssignment() +void Tests::hashMoveConstructorAndAssignment() { QString str("2d73736f34a73837d422f7aba2740d8409ac60df"); diff --git a/application/Common/TestsCommon/Tests.h b/application/Common/TestsCommon/Tests.h index 90857708..58901e1a 100644 --- a/application/Common/TestsCommon/Tests.h +++ b/application/Common/TestsCommon/Tests.h @@ -70,7 +70,7 @@ private slots: void generateAHash(); void buildAnHashFromAString(); void compareTwoHash(); - void hashMoveConstuctorAndAssignment(); + void hashMoveConstructorAndAssignment(); void hasher(); // BloomFilter class. diff --git a/application/Common/ThreadPool.cpp b/application/Common/ThreadPool.cpp index 8a8970df..d1aa2c3e 100644 --- a/application/Common/ThreadPool.cpp +++ b/application/Common/ThreadPool.cpp @@ -120,7 +120,7 @@ QWeakPointer Thread::getRunnable() const * @class Common::ThreadPool * * A ThreadPool object can run runnable objects (see 'Common::IRunnable'), each thread dedicated to a runnable object will be created if needed. - * At the begining there is no thread, when the first runnable object is given to the method 'run(..)' the first thread is created. + * At the beginning there is no thread, when the first runnable object is given to the method 'run(..)' the first thread is created. * After the task of the runnable object is completed the thread will become inactive and can be reused by another runnable object for * a given period ('threadInactiveLifetime'). If the thread is not reused after this period and there is more thread than 'nbMinThread' * the thread is deleted. diff --git a/application/Common/Timeoutable.h b/application/Common/Timeoutable.h index 0c29f62b..e5e80494 100644 --- a/application/Common/Timeoutable.h +++ b/application/Common/Timeoutable.h @@ -23,7 +23,7 @@ namespace Common { - // An inteface 'ITimeoutable' should be great but the QObject system doesn't support diamond inheritance. + // An interface 'ITimeoutable' should be great but the QObject system doesn't support diamond inheritance. class Timeoutable : public QObject { Q_OBJECT diff --git a/application/Common/TransferRateCalculator.cpp b/application/Common/TransferRateCalculator.cpp index 4f96f8a3..8743034d 100644 --- a/application/Common/TransferRateCalculator.cpp +++ b/application/Common/TransferRateCalculator.cpp @@ -29,7 +29,7 @@ using namespace Common; * Compute an average value for a transfer rate in byte/s. * The period value is set in the header: PERIOD. * When some data are received or sent the method 'addData(..)' is called with the amount of data in bytes. - * The current transfer rate can be retreived with the method 'getTransferRate()'. + * The current transfer rate can be retrieved with the method 'getTransferRate()'. * An instance of 'TransferRateCalculator' can be shared among several threads. */ diff --git a/application/Common/ZeroCopyStreamQIODevice.h b/application/Common/ZeroCopyStreamQIODevice.h index 001651e4..2d055245 100644 --- a/application/Common/ZeroCopyStreamQIODevice.h +++ b/application/Common/ZeroCopyStreamQIODevice.h @@ -60,7 +60,7 @@ namespace Common int nbLastRead; char* buffer; - char* pos; ///< Point on the remaining data, remaing data size is "buffer + nbLastRead - pos". + char* pos; ///< Point on the remaining data, remaining data size is "buffer + nbLastRead - pos". google::protobuf::int64 bytesRead; }; diff --git a/application/Core/ChatSystem/priv/ChatMessages.cpp b/application/Core/ChatSystem/priv/ChatMessages.cpp index 60a71f4e..e46c9fd6 100644 --- a/application/Core/ChatSystem/priv/ChatMessages.cpp +++ b/application/Core/ChatSystem/priv/ChatMessages.cpp @@ -73,7 +73,7 @@ QList> ChatMessages::getMessages() const } /** - * Returns the last unkown messages, the known message IDs are defined into 'getLastChatMessage'. + * Returns the last unknown messages, the known message IDs are defined into 'getLastChatMessage'. * The returned messages are sorted from oldest to youngest. */ QList> ChatMessages::getUnknownMessages(const Protos::Core::GetLastChatMessages& getLastChatMessage) const @@ -135,11 +135,11 @@ void ChatMessages::loadFromFile(const QString& filename) } catch (Common::UnknownValueException&) { - L_WARN(QString("The saved chat messages cannot be retrived (the file doesn't exist): %1").arg(filename)); + L_WARN(QString("The saved chat messages cannot be retrieved (the file doesn't exist): %1").arg(filename)); } catch (...) { - L_WARN(QString("The saved chat messages cannot be retrived (Unkown exception): %1").arg(filename)); + L_WARN(QString("The saved chat messages cannot be retrieved (Unknown exception): %1").arg(filename)); } } diff --git a/application/Core/Core.cpp b/application/Core/Core.cpp index 16bccd15..c8b159d7 100644 --- a/application/Core/Core.cpp +++ b/application/Core/Core.cpp @@ -238,7 +238,7 @@ Protos::Core::Settings* Core::createDefaultValuesSettings() void Core::checkSettingsIntegrity() { if (SETTINGS.get("nick").isEmpty()) - SETTINGS.set("nick", Common::Global::getCurrenMachineName()); + SETTINGS.set("nick", Common::Global::getCurrentMachineName()); this->checkSetting("buffer_size_reading", 1024u, 32u * 1024u * 1024u); this->checkSetting("buffer_size_writing", 1024u, 32u * 1024u * 1024u); diff --git a/application/Core/Core.h b/application/Core/Core.h index 90ab386d..ac99b3ef 100644 --- a/application/Core/Core.h +++ b/application/Core/Core.h @@ -64,7 +64,7 @@ namespace CoreSpace template void checkSetting(const QString& name, T min, T max); - // This objet will be the last destroyed. + // This object will be the last destroyed. struct Cleaner { ~Cleaner() { SETTINGS.free(); google::protobuf::ShutdownProtobufLibrary(); diff --git a/application/Core/DownloadManager/IDownload.h b/application/Core/DownloadManager/IDownload.h index ef15ce33..c77144db 100644 --- a/application/Core/DownloadManager/IDownload.h +++ b/application/Core/DownloadManager/IDownload.h @@ -54,7 +54,7 @@ namespace DM FILE_IO_ERROR = 0x26, FILE_NON_EXISTENT = 0x27, GOT_TOO_MUCH_DATA = 0x28, - HASH_MISSMATCH = 0x29, + HASH_MISMATCH = 0x29, REMOTE_SCANNING_IN_PROGRESS = 0x31, LOCAL_SCANNING_IN_PROGRESS = 0x33, diff --git a/application/Core/DownloadManager/priv/ChunkDownloader.cpp b/application/Core/DownloadManager/priv/ChunkDownloader.cpp index ae86c425..71cd8af1 100644 --- a/application/Core/DownloadManager/priv/ChunkDownloader.cpp +++ b/application/Core/DownloadManager/priv/ChunkDownloader.cpp @@ -261,14 +261,14 @@ void ChunkDownloader::run() this->closeTheSocket = true; this->lastTransferStatus = GOT_TOO_MUCH_DATA; } - catch (FM::hashMissmatchException) + catch (FM::hashMismatchException) { static const quint32 BLOCK_DURATION = SETTINGS.get("block_duration_corrupted_data"); L_USER(QString(tr("Corrupted data received for the file \"%1\" from peer %2. Peer blocked for %3 ms")).arg(this->chunk->getFilePath()).arg(this->currentDownloadingPeer->getNick()).arg(BLOCK_DURATION)); /*: A reason why the user has been blocked */ this->currentDownloadingPeer->block(BLOCK_DURATION, tr("Has sent corrupted data")); this->closeTheSocket = true; - this->lastTransferStatus = HASH_MISSMATCH; + this->lastTransferStatus = HASH_MISMATCH; } if (timer.elapsed() > MINIMUM_DELTA_TIME_TO_COMPUTE_SPEED) @@ -353,7 +353,7 @@ bool ChunkDownloader::hasAtLeastAPeer() * FILE_IO_ERROR * FILE_NON_EXISTENT * GOT_TOO_MUCH_DATA - * HASH_MISSMATCH + * HASH_MISMATCH */ Status ChunkDownloader::getLastTransferStatus() const { @@ -383,7 +383,7 @@ QList ChunkDownloader::getPeers() QList peers; peers.reserve(this->peers.size()); - bool isTheNmberOfPeersHasChanged = false; + bool isTheNumberOfPeersHasChanged = false; for (QMutableListIterator i(this->peers); i.hasNext();) { PM::IPeer* peer = i.next(); @@ -393,17 +393,17 @@ QList ChunkDownloader::getPeers() { i.remove(); this->linkedPeers.rmLink(peer); - isTheNmberOfPeersHasChanged = true; + isTheNumberOfPeersHasChanged = true; } } - if (isTheNmberOfPeersHasChanged) + if (isTheNumberOfPeersHasChanged) emit numberOfPeersChanged(); return peers; } /** * Tell the ChunkDownloader to download the chunk from one of its peer. - * @return the choosen peer if the downloading has been started else return 0. + * @return the chosen peer if the downloading has been started else return 0. */ PM::IPeer* ChunkDownloader::startDownloading() { @@ -525,7 +525,7 @@ PM::IPeer* ChunkDownloader::getTheFastestFreePeer() QMutexLocker locker(&this->mutex); PM::IPeer* current = nullptr; - bool isTheNmberOfPeersHasChanged = false; + bool isTheNumberOfPeersHasChanged = false; for (QMutableListIterator i(this->peers); i.hasNext();) { PM::IPeer* peer = i.next(); @@ -533,13 +533,13 @@ PM::IPeer* ChunkDownloader::getTheFastestFreePeer() { i.remove(); this->linkedPeers.rmLink(peer); - isTheNmberOfPeersHasChanged = true; + isTheNumberOfPeersHasChanged = true; } else if (this->occupiedPeersDownloadingChunk.isPeerFree(peer) && (!current || peer->getSpeed() > current->getSpeed())) current = peer; } - if (isTheNmberOfPeersHasChanged) + if (isTheNumberOfPeersHasChanged) emit numberOfPeersChanged(); return current; @@ -550,7 +550,7 @@ int ChunkDownloader::getNumberOfFreePeer() QMutexLocker locker(&this->mutex); int n = 0; - bool isTheNmberOfPeersHasChanged = false; + bool isTheNumberOfPeersHasChanged = false; for (QMutableListIterator i(this->peers); i.hasNext();) { PM::IPeer* peer = i.next(); @@ -558,13 +558,13 @@ int ChunkDownloader::getNumberOfFreePeer() { i.remove(); this->linkedPeers.rmLink(peer); - isTheNmberOfPeersHasChanged = true; + isTheNumberOfPeersHasChanged = true; } else if (this->occupiedPeersDownloadingChunk.isPeerFree(peer)) n++; } - if (isTheNmberOfPeersHasChanged) + if (isTheNumberOfPeersHasChanged) emit numberOfPeersChanged(); return n; diff --git a/application/Core/DownloadManager/priv/ChunkDownloader.h b/application/Core/DownloadManager/priv/ChunkDownloader.h index c69b9984..60d73e72 100644 --- a/application/Core/DownloadManager/priv/ChunkDownloader.h +++ b/application/Core/DownloadManager/priv/ChunkDownloader.h @@ -89,7 +89,7 @@ namespace DM signals: void downloadStarted(); /** - * Emitted when a downlad is terminated (or aborted). + * Emitted when a download is terminated (or aborted). */ void downloadFinished(); void numberOfPeersChanged(); diff --git a/application/Core/DownloadManager/priv/Constants.h b/application/Core/DownloadManager/priv/Constants.h index 2a78a63d..0b02bb46 100644 --- a/application/Core/DownloadManager/priv/Constants.h +++ b/application/Core/DownloadManager/priv/Constants.h @@ -22,7 +22,7 @@ namespace DM { - const int RETRY_PEER_GET_HASHES_PERIOD = 10000; // [ms]. If the hashes cannot be retrieve frome a peer, we wait 10s before retrying. + const int RETRY_PEER_GET_HASHES_PERIOD = 10000; // [ms]. If the hashes cannot be retrieve from a peer, we wait 10s before retrying. const int RETRY_GET_ENTRIES_PERIOD = 10000; // [ms]. If a directory can't be browsed, we wait 10s before retrying. const int RESTART_DOWNLOADS_PERIOD_IF_ERROR = 10000; // [ms]. If one or more download has a status >= 0x20 then it will be restarted periodically. diff --git a/application/Core/DownloadManager/priv/DirDownload.cpp b/application/Core/DownloadManager/priv/DirDownload.cpp index 9cbf33b6..303f495f 100644 --- a/application/Core/DownloadManager/priv/DirDownload.cpp +++ b/application/Core/DownloadManager/priv/DirDownload.cpp @@ -29,9 +29,9 @@ using namespace DM; /** * @class DM::DirDownload * - * A DirDownload will try, when the method 'retrieveEntries' is called, to retreive all the sub entries of a remote directory. + * A DirDownload will try, when the method 'retrieveEntries' is called, to retrieve all the sub entries of a remote directory. * The sub entries can be a mix of files and directories. - * Once the content is know, the signal 'newEntries' is emmited. + * Once the content is know, the signal 'newEntries' is emitted. */ DirDownload::DirDownload( @@ -175,7 +175,7 @@ void DirDownload::createDirectory() } catch (FM::NoWriteableDirectoryException&) { - L_DEBU(QString("There is no shared directory with writting rights for this download: %1").arg(Common::ProtoHelper::getStr(this->remoteEntry, &Protos::Common::Entry::name))); + L_DEBU(QString("There is no shared directory with writing rights for this download: %1").arg(Common::ProtoHelper::getStr(this->remoteEntry, &Protos::Common::Entry::name))); this->setStatus(NO_SHARED_DIRECTORY_TO_WRITE); } catch (FM::UnableToCreateNewDirException&) diff --git a/application/Core/DownloadManager/priv/DownloadManager.cpp b/application/Core/DownloadManager/priv/DownloadManager.cpp index c121e7cb..fd2fee1f 100644 --- a/application/Core/DownloadManager/priv/DownloadManager.cpp +++ b/application/Core/DownloadManager/priv/DownloadManager.cpp @@ -251,7 +251,7 @@ QList> DownloadManager::getTheFirstUnfinishedCh { QList> unfinishedChunks; - DownloadQueue::ScanningIterator i(this->downloadQueue); + DownloadQueue::ScanningIterator i(this->downloadQueue); FileDownload* fileDownload; while (unfinishedChunks.size() < n && (fileDownload = static_cast(i.next()))) { @@ -275,7 +275,7 @@ void DownloadManager::peerBecomesAvailable(PM::IPeer* peer) { this->downloadQueue.peerBecomesAvailable(peer); - // To handle the case where the peers source of some downloads without all the hashes become alive after being dead for a while. The hashes must be reasked. + // To handle the case where the peers source of some downloads without all the hashes become alive after being dead for a while. The hashes must be re-asked. this->occupiedPeersAskingForEntries.newPeer(peer); this->occupiedPeersAskingForHashes.newPeer(peer); this->occupiedPeersDownloadingChunk.newPeer(peer); @@ -332,7 +332,7 @@ void DownloadManager::peerNoLongerAskingForHashes(PM::IPeer* peer) return; // We can't use 'downloadsIndexedBySourcePeerID' because the order matters. - DownloadQueue::ScanningIterator i(this->downloadQueue); + DownloadQueue::ScanningIterator i(this->downloadQueue); while (FileDownload* fileDownload = static_cast(i.next())) if (!fileDownload->isStatusErroneous() && fileDownload->retrieveHashes()) break; @@ -377,7 +377,7 @@ void DownloadManager::scanTheQueue() QSet linkedPeersNotOccupied(peers.begin(), peers.end()); linkedPeersNotOccupied -= this->occupiedPeersDownloadingChunk.getOccupiedPeers(); - DownloadQueue::ScanningIterator i(this->downloadQueue); + DownloadQueue::ScanningIterator i(this->downloadQueue); while (numberOfDownloadThreadRunningCopy < NUMBER_OF_DOWNLOADER && !linkedPeersNotOccupied.isEmpty()) { @@ -445,7 +445,7 @@ void DownloadManager::downloadStatusBecomeErroneous(Download* download) } /** - * Load the queue, called once at the begining of the program. + * Load the queue, called once at the beginning of the program. * Will start the timer to save periodically the queue. */ void DownloadManager::loadQueueFromFile() diff --git a/application/Core/DownloadManager/priv/DownloadManager.h b/application/Core/DownloadManager/priv/DownloadManager.h index 10f2f92e..5edb414c 100644 --- a/application/Core/DownloadManager/priv/DownloadManager.h +++ b/application/Core/DownloadManager/priv/DownloadManager.h @@ -124,7 +124,7 @@ namespace DM QTimer startErroneousDownloadTimer; // When one or more downloads are in error state, we try to relaunch them periodically. - QTimer saveTimer; // To know when to save the queue, for exemple each 5min. + QTimer saveTimer; // To know when to save the queue, for example each 5min. bool queueChanged; bool queueLoaded; }; diff --git a/application/Core/DownloadManager/priv/DownloadPredicate.cpp b/application/Core/DownloadManager/priv/DownloadPredicate.cpp index bd3dddb4..393f247e 100644 --- a/application/Core/DownloadManager/priv/DownloadPredicate.cpp +++ b/application/Core/DownloadManager/priv/DownloadPredicate.cpp @@ -24,7 +24,7 @@ using namespace DM; #include #include -bool IsDownloable::operator() (const Download* download) const +bool IsDownloadable::operator() (const Download* download) const { const FileDownload* fileDownload = dynamic_cast(download); return fileDownload && fileDownload->getStatus() != COMPLETE && fileDownload->getStatus() != DELETED; diff --git a/application/Core/DownloadManager/priv/DownloadPredicate.h b/application/Core/DownloadManager/priv/DownloadPredicate.h index cb1e8cc4..d65b6c3c 100644 --- a/application/Core/DownloadManager/priv/DownloadPredicate.h +++ b/application/Core/DownloadManager/priv/DownloadPredicate.h @@ -31,7 +31,7 @@ namespace DM virtual ~DownloadPredicate() {} }; - struct IsDownloable : public DownloadPredicate + struct IsDownloadable : public DownloadPredicate { bool operator() (const Download* download) const; }; diff --git a/application/Core/DownloadManager/priv/DownloadQueue.cpp b/application/Core/DownloadManager/priv/DownloadQueue.cpp index fa9ca49b..3e74d9b1 100644 --- a/application/Core/DownloadManager/priv/DownloadQueue.cpp +++ b/application/Core/DownloadManager/priv/DownloadQueue.cpp @@ -36,7 +36,7 @@ using namespace DM; * Goals: * - Manage a queue of downloads. * - Index queue by download peers to improve performance. - * - Save some positions (markers) to improve itarating performance (see the 'ScanningIterator' class). + * - Save some positions (markers) to improve iterating performance (see the 'ScanningIterator' class). * - Persist/load the queue to/from a file. */ @@ -238,7 +238,7 @@ bool DownloadQueue::removeDownloads(const DownloadPredicate& predicate) } /** - * Return true if one or more download have been paused or unpaused. + * Return true if one or more download have been paused or un-paused. */ bool DownloadQueue::pauseDownloads(QList IDs, bool pause) { @@ -330,11 +330,11 @@ Protos::Queue::Queue DownloadQueue::loadFromFile() } catch (Common::UnknownValueException& e) { - L_WARN(QString("The download queue file cache cannot be retrived (the file doesn't exist): %1").arg(Common::Constants::FILE_QUEUE)); + L_WARN(QString("The download queue file cache cannot be retrieved (the file doesn't exist): %1").arg(Common::Constants::FILE_QUEUE)); } catch (...) { - L_WARN(QString("The download queue file cache cannot be retrived (Unkown exception): %1").arg(Common::Constants::FILE_QUEUE)); + L_WARN(QString("The download queue file cache cannot be retrieved (Unknown exception): %1").arg(Common::Constants::FILE_QUEUE)); } return savedQueue; diff --git a/application/Core/DownloadManager/priv/FileDownload.cpp b/application/Core/DownloadManager/priv/FileDownload.cpp index 1b6327df..c1777156 100644 --- a/application/Core/DownloadManager/priv/FileDownload.cpp +++ b/application/Core/DownloadManager/priv/FileDownload.cpp @@ -331,7 +331,7 @@ void FileDownload::remove() */ bool FileDownload::retrieveHashes() { - // If we've already got all the chunk hashes it's unecessary to re-ask them. + // If we've already got all the chunk hashes it's unnecessary to re-ask them. if ( this->nbHashesKnown == this->NB_CHUNK || this->status == COMPLETE || @@ -588,7 +588,7 @@ void FileDownload::connectChunkDownloaderSignals(const QSharedPointerremoteEntry, &Protos::Common::Entry::name))); + L_DEBU(QString("There is no shared directory with writing rights for this download: %1").arg(Common::ProtoHelper::getStr(this->remoteEntry, &Protos::Common::Entry::name))); this->setStatus(NO_SHARED_DIRECTORY_TO_WRITE); return false; } diff --git a/application/Core/DownloadManager/priv/Utils.cpp b/application/Core/DownloadManager/priv/Utils.cpp index fbd48207..9c2cb08f 100644 --- a/application/Core/DownloadManager/priv/Utils.cpp +++ b/application/Core/DownloadManager/priv/Utils.cpp @@ -46,7 +46,7 @@ using namespace DM; case FILE_IO_ERROR: return "FILE_IO_ERROR"; case FILE_NON_EXISTENT: return "FILE_NON_EXISTENT"; case GOT_TOO_MUCH_DATA: return "GOT_TOO_MUCH_DATA"; - case HASH_MISSMATCH: return "HASH_MISSMATCH"; + case HASH_MISMATCH: return "HASH_MiSMATCH"; case REMOTE_SCANNING_IN_PROGRESS: return "REMOTE_SCANNING_IN_PROGRESS"; case LOCAL_SCANNING_IN_PROGRESS: return "LOCAL_SCANNING_IN_PROGRESS"; diff --git a/application/Core/FileManager/Exceptions.h b/application/Core/FileManager/Exceptions.h index 66379d87..08f59884 100644 --- a/application/Core/FileManager/Exceptions.h +++ b/application/Core/FileManager/Exceptions.h @@ -44,7 +44,7 @@ namespace FM virtual ~ItemsNotFoundException() throw () {} }; - class hashMissmatchException {}; + class hashMismatchException {}; class NoWriteableDirectoryException{}; diff --git a/application/Core/FileManager/IDataWriter.h b/application/Core/FileManager/IDataWriter.h index 264733db..4e3ed172 100644 --- a/application/Core/FileManager/IDataWriter.h +++ b/application/Core/FileManager/IDataWriter.h @@ -32,7 +32,7 @@ namespace FM * @exception IOErrorException * @exception ChunkDeletedException When trying to write to a deleted chunk. * @exception TryToWriteBeyondTheEndOfChunkException - * @exception hashMissmatchException This occurs only when the setting 'check_received_data_integrity' is enabled. When this exception is thrown the chunk data are reset. + * @exception hashMismatchException This occurs only when the setting 'check_received_data_integrity' is enabled. When this exception is thrown the chunk data are reset. */ virtual bool write(const char* buffer, int nbBytes) = 0; }; diff --git a/application/Core/FileManager/IFileManager.h b/application/Core/FileManager/IFileManager.h index d51dd01b..27907936 100644 --- a/application/Core/FileManager/IFileManager.h +++ b/application/Core/FileManager/IFileManager.h @@ -38,12 +38,12 @@ namespace FM class IGetEntriesResult; /** - * The file manager controls all shared directories and files. It offers these fonctions: + * The file manager controls all shared directories and files. It offers these functions: * - Add or remove one ore more shared directory. * - Watch the shared directories recursively to update the model if a file/directory is added, changed, renamed or removed. * - Browse the cache. * - Offer a quick indexed multi-term search based on the names of files and directories. - * - Offer a way to indentify each chunk of a file by a hash. + * - Offer a way to identify each chunk of a file by a hash. * - Read or write a file chunk. * - Persist data to avoid re-hashing. */ @@ -113,7 +113,7 @@ namespace FM /** * Return the hashes from a FileEntry. If the hashes don't exist they will be computed on the fly. However this - * Method is non-blocking, when the hashes are ready a signal will be emited by the IGetHashesResult object. + * Method is non-blocking, when the hashes are ready a signal will be emitted by the IGetHashesResult object. */ virtual QSharedPointer getHashes(const Protos::Common::Entry& file) = 0; @@ -185,7 +185,7 @@ namespace FM signals: /** - * Emitted when the file cache has been loaded: all files and directories from shared entries has been scanned and added to the cache. Guaranteed to be emmited once. + * Emitted when the file cache has been loaded: all files and directories from shared entries has been scanned and added to the cache. Guaranteed to be emitted once. */ void fileCacheLoaded(); }; diff --git a/application/Core/FileManager/TestsFileManager/StressTest.cpp b/application/Core/FileManager/TestsFileManager/StressTest.cpp index 564c1a0b..9ba89d7c 100644 --- a/application/Core/FileManager/TestsFileManager/StressTest.cpp +++ b/application/Core/FileManager/TestsFileManager/StressTest.cpp @@ -487,7 +487,7 @@ void StressTest::haveChunk() time.start(); QBitArray result = this->fileManager->haveChunks(hashes); - qDebug() << "Ask for" << hashes.size() << "hashe(s). Request time :" << time.elapsed() << "ms"; + qDebug() << "Ask for" << hashes.size() << "hash(es). Request time :" << time.elapsed() << "ms"; if (result.isNull()) { qDebug() << " -> " << "Don't have any hashes"; diff --git a/application/Core/FileManager/TestsFileManager/Tests.cpp b/application/Core/FileManager/TestsFileManager/Tests.cpp index f92725a9..d1010faa 100644 --- a/application/Core/FileManager/TestsFileManager/Tests.cpp +++ b/application/Core/FileManager/TestsFileManager/Tests.cpp @@ -419,9 +419,9 @@ void Tests::getAnExistingChunk() qDebug() << "Chunk found: " << chunk->getHash().toStr(); } -void Tests::getAnUnexistingChunk() +void Tests::getANonExistingChunk() { - qDebug() << "===== getAnUnexistingChunk() ====="; + qDebug() << "===== getANonExistingChunk() ====="; QSharedPointer chunk = this->fileManager->getChunk(Common::Hash::fromStr("928e1bd85c0957c4af0cf69cf76f6ed6898cfd2d")); if (chunk.isNull()) @@ -492,9 +492,9 @@ void Tests::getHashesFromAFileEntry2() QTest::qWait(4000); } -void Tests::browseSomedirectories() +void Tests::browseSomeDirectories() { - qDebug() << "===== browseSomedirectories() ====="; + qDebug() << "===== browseSomeDirectories() ====="; // TODO: active the regexp comparison. @@ -535,9 +535,9 @@ void Tests::findExistingFilesWithOneWord() this->compareExpectedResult(results.first(), expectedResult); } -void Tests::findUnexistingFilesWithOneWord() +void Tests::findNonExistingFilesWithOneWord() { - qDebug() << "===== findUnexistingFilesWithOneWord() ====="; + qDebug() << "===== findNonExistingFilesWithOneWord() ====="; QString terms("mmmm"); QList results = this->fileManager->find(terms, 10000, 65536); diff --git a/application/Core/FileManager/TestsFileManager/Tests.h b/application/Core/FileManager/TestsFileManager/Tests.h index 34c97399..04de0fad 100644 --- a/application/Core/FileManager/TestsFileManager/Tests.h +++ b/application/Core/FileManager/TestsFileManager/Tests.h @@ -71,7 +71,7 @@ private slots: /***** Ask for chunks by hash *****/ void getAnExistingChunk(); - void getAnUnexistingChunk(); + void getANonExistingChunk(); /***** Get Hashes from a FileEntry which the hash is already computed *****/ void getHashesFromAFileEntry1(); @@ -80,11 +80,11 @@ private slots: void getHashesFromAFileEntry2(); /***** Browse the shared directories *****/ - void browseSomedirectories(); + void browseSomeDirectories(); /***** Find files and directories by keywords *****/ void findExistingFilesWithOneWord(); - void findUnexistingFilesWithOneWord(); + void findNonExistingFilesWithOneWord(); void findFilesWithSomeWords1(); void findFilesWithSomeWords2(); void findFilesWithResultFragmentation(); @@ -108,7 +108,7 @@ private slots: /***** Speed test of the class 'Chunks' *****/ void chunksPerformance(); - /***** The exenstion index class *****/ + /***** The extension index class *****/ void extensionIndexAddItem(); void extensionIndexRmItem(); void extensionIndexChangeItem(); diff --git a/application/Core/FileManager/priv/Cache/Cache.cpp b/application/Core/FileManager/priv/Cache/Cache.cpp index 6f56c947..68d9a909 100644 --- a/application/Core/FileManager/priv/Cache/Cache.cpp +++ b/application/Core/FileManager/priv/Cache/Cache.cpp @@ -827,7 +827,7 @@ void Cache::createSharedPaths(const QList& paths, const QList 0) * @exception NoWriteableDirectoryException * @exception UnableToCreateNewDirException diff --git a/application/Core/FileManager/priv/Cache/DataWriter.cpp b/application/Core/FileManager/priv/Cache/DataWriter.cpp index e5894dba..afbcc4c2 100644 --- a/application/Core/FileManager/priv/Cache/DataWriter.cpp +++ b/application/Core/FileManager/priv/Cache/DataWriter.cpp @@ -51,7 +51,7 @@ bool DataWriter::write(const char* buffer, int nbBytes) if (this->chunk.getKnownBytes() + nbBytes == this->chunk.getChunkSize() && this->hasher.getResult() != this->chunk.getHash()) { this->chunk.setKnownBytes(0); - throw hashMissmatchException(); + throw hashMismatchException(); } } diff --git a/application/Core/FileManager/priv/Cache/Directory.cpp b/application/Core/FileManager/priv/Cache/Directory.cpp index f7745c42..e87fb1eb 100644 --- a/application/Core/FileManager/priv/Cache/Directory.cpp +++ b/application/Core/FileManager/priv/Cache/Directory.cpp @@ -79,7 +79,7 @@ void Directory::del(bool invokeDelete) } /** - * Retore the hashes from the cache. + * Restore the hashes from the cache. * All file which are not complete and not in the cache are physically removed. * Only files ending with the setting "unfinished_suffix_term" will be removed. * @return The files which have all theirs hashes (complete). diff --git a/application/Core/FileManager/priv/Cache/File.cpp b/application/Core/FileManager/priv/Cache/File.cpp index b787b7e4..b32e2882 100644 --- a/application/Core/FileManager/priv/Cache/File.cpp +++ b/application/Core/FileManager/priv/Cache/File.cpp @@ -57,7 +57,7 @@ using namespace FM; /** * Create a new file into a given directory. - * The file may or may not have a correponding local file. + * The file may or may not have a corresponding local file. * If 'createPhysically' is true then the file is created as unfinished with no byte known. * * @param dir The directory that owns the file. @@ -142,7 +142,7 @@ FileForHasher* File::asFileForHasher() /** * Set the file as unfinished, this is use when an existing file is re-downloaded. - * The file is removed from the index and a new physcally file named ".unfinished" is created. + * The file is removed from the index and a new physically file named ".unfinished" is created. * The old physical file is not removed and will be replaced only when this one is finished. * @exception UnableToCreateNewFileException */ @@ -380,7 +380,7 @@ void File::dataReaderDeleted() /** * Write some bytes to the file at the given offset. - * If the buffer exceed the file size then only the begining of the buffer is + * If the buffer exceed the file size then only the beginning of the buffer is * used, the file is not resizing. * @exception IOErrorException * @param buffer The buffer containing the data to write. @@ -405,7 +405,7 @@ qint64 File::write(const char* buffer, int nbBytes, qint64 offset) /** * Fill the buffer with the read bytes from the given offset. - * If the end of file is reached the buffer will be partialy filled. + * If the end of file is reached the buffer will be partially filled. * @param buffer The buffer where my data will be put after the reading. * @param offset An offset into the file where the data will be read. * @param maxBytesToRead The number of bytes to read, the buffer size must be at least this value. @@ -579,8 +579,8 @@ void File::setAsComplete() QMutexLocker lockerWrite(&this->writeLock); QMutexLocker lockerRead(&this->readLock); // On Windows with some kinds of device like external hard drive this call can suspend the execution - // for a long time like 10 seconds ('ClosHandle(..)' will flush all data and wait). Some actions will be also blocks by the mutex - // like browsing the parent directory. The workaround is to temporaty unlock the mutex during this operation. + // for a long time like 10 seconds ('CloseHandle(..)' will flush all data and wait). Some actions will be also blocks by the mutex + // like browsing the parent directory. The workaround is to temporary unlock the mutex during this operation. this->mutex.unlock(); this->cache->getFilePool().forceReleaseAll(this->getFullPath()); this->mutex.lock(); diff --git a/application/Core/FileManager/priv/Cache/FilePool.h b/application/Core/FileManager/priv/Cache/FilePool.h index d694c89e..9d4a6103 100644 --- a/application/Core/FileManager/priv/Cache/FilePool.h +++ b/application/Core/FileManager/priv/Cache/FilePool.h @@ -62,7 +62,7 @@ namespace FM /** * Little helper class to autorelease a file opened with a 'FilePool' when going out of scope. - * Don't forget to test if the file has been correctely created before using it. For example: + * Don't forget to test if the file has been correctly created before using it. For example: * AutoReleasedFile f(fp, path, mode); * if (!f) * [..] diff --git a/application/Core/FileManager/priv/Cache/SharedDirectory.h b/application/Core/FileManager/priv/Cache/SharedDirectory.h deleted file mode 100644 index 070a3cae..00000000 --- a/application/Core/FileManager/priv/Cache/SharedDirectory.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * D-LAN - A decentralized LAN file sharing software. - * Copyright (C) 2010-2012 Greg Burri - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include - -#include -#include - -namespace FM -{ - class Cache; - class FileManager; - - class SharedDirectory : public Directory - { - public: - SharedDirectory(Cache* cache, const QString& path, const Common::Hash& id); - SharedDirectory(Cache* cache, const QString& path); - - void mergeSubSharedDirectories(); - - void populateEntry(Protos::Common::Entry* entry, bool setSharedDir = false) const; - - private: - void init(); - - public: - ~SharedDirectory(); - void del(bool invokeDelete = true); - - void moveInto(Directory* directory); - void moveInto(const QString& path); - - QString getPath() const; - - /** - * Return the full path to the shared directory. - * There is always a slash at the end. - * For exemple : - * - '/home/paul/movies/' - * - '/'. - * - 'C:/Users/Paul/My Movies/' - * - 'G:/' - */ - QString getFullPath() const; - - SharedDirectory* getRoot() const; - - Common::Hash getId() const; - - private: - static QString dirName(const QString& path); - QString pathWithoutDirName(const QString& path); - - QString path; // Always ended by a slash '/'. - Common::Hash id; - }; -} diff --git a/application/Core/FileManager/priv/FileManager.cpp b/application/Core/FileManager/priv/FileManager.cpp index 57f3de84..8eeda245 100644 --- a/application/Core/FileManager/priv/FileManager.cpp +++ b/application/Core/FileManager/priv/FileManager.cpp @@ -497,16 +497,16 @@ void FileManager::chunkRemoved(const QSharedPointer& chunk) // catch (ItemsNotFoundException& e) // { // foreach (QString path, e.paths) -// L_WARN(QString("During the file cache loading, this directory hasn't been found : %1").arg(path)); +// L_WARN(QString("During the file cache loading, this directory hasn't been found: %1").arg(path)); // } // } // catch (Common::UnknownValueException& e) // { -// L_WARN(QString("The persisted file cache cannot be retrived (the file doesn't exist) : %1").arg(Common::Constants::FILE_CACHE)); +// L_WARN(QString("The persisted file cache cannot be retrieved (the file doesn't exist): %1").arg(Common::Constants::FILE_CACHE)); // } // catch (...) // { -// L_WARN(QString("The persisted file cache cannot be retrived (Unkown exception) : %1").arg(Common::Constants::FILE_CACHE)); +// L_WARN(QString("The persisted file cache cannot be retrieved (Unknown exception): %1").arg(Common::Constants::FILE_CACHE)); // } // this->fileUpdater.setFileCache(savedCache); @@ -564,7 +564,7 @@ void FileManager::forcePersistCacheToFile() */ /** - * @warning Can be called from differents thread like a 'Downloader' or the 'FileUpdater'. + * @warning Can be called from different threads like a 'Downloader' or the 'FileUpdater'. */ void FileManager::setCacheChanged() { diff --git a/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.cpp b/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.cpp index 8f102bf5..18fffd3f 100644 --- a/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.cpp +++ b/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.cpp @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include using namespace FM; @@ -45,7 +45,7 @@ const uint32_t DirWatcherLinux::EVENTS_FILE = IN_MODIFY | IN_MOVE_SELF | IN_DELE class UnableToWatchException {}; -/**ath=/home/gburri/Downloads//Leonard - 35 albums/07 - Y a-t-il un génie dans la salle +/** * Constructor. */ DirWatcherLinux::DirWatcherLinux() : @@ -326,7 +326,7 @@ const QList DirWatcherLinux::waitEvent(int timeout, QListgetDir(fromEvent->wd)->childs.value(fromEvent->name); // TODO: check if the dir exists!? + Dir* movedDir = this->getDir(fromEvent->wd)->children.value(fromEvent->name); // TODO: check if the dir exists!? // If the name of moved directory has changed, rename it. if (movedDir && fromEvent->name != event->name) @@ -363,7 +363,7 @@ const QList DirWatcherLinux::waitEvent(int timeout, QListgetEventPath(event))); events << WatcherEvent(WatcherEvent::DELETED, this->getEventPath(event)); if (event->mask & IN_ISDIR) - delete dir->childs.value(event->name); + delete dir->children.value(event->name); } if (event->mask & IN_CREATE) @@ -428,9 +428,6 @@ const QList DirWatcherLinux::waitEvent(int timeout, QList j(this->childs); j.hasNext();) + for (QHashIterator j(this->children); j.hasNext();) { auto child = j.next(); child.value()->parent = nullptr; @@ -505,7 +502,7 @@ DirWatcherLinux::Dir::Dir(DirWatcherLinux* dwl, Dir* parent, const QString& name if (this->parent) - this->parent->childs.insert(this->name, this); + this->parent->children.insert(this->name, this); } /** @@ -517,11 +514,11 @@ DirWatcherLinux::Dir::~Dir() { if (inotify_rm_watch(this->dwl->fileDescriptor, this->wd)) L_WARN(QString("Dir::~Dir: Unable to remove an inotify watcher.")); - + if (this->parent) - this->parent->childs.remove(this->name); + this->parent->children.remove(this->name); - for (QHashIterator i(this->childs); i.hasNext();) + for (QHashIterator i(this->children); i.hasNext();) { auto child = i.next(); child.value()->parent = nullptr; @@ -550,9 +547,9 @@ QString DirWatcherLinux::Dir::getFullPath() */ void DirWatcherLinux::Dir::rename(const QString& newName) { - this->parent->childs.remove(this->name); + this->parent->children.remove(this->name); this->name = newName; - this->parent->childs.insert(this->name, this); + this->parent->children.insert(this->name, this); } /** @@ -561,9 +558,9 @@ void DirWatcherLinux::Dir::rename(const QString& newName) */ void DirWatcherLinux::Dir::move(Dir* to) { - this->parent->childs.remove(this->name); + this->parent->children.remove(this->name); this->parent = to; - to->childs.insert(this->name, this); + to->children.insert(this->name, this); } /** diff --git a/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.h b/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.h index d680bf04..799858f6 100644 --- a/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.h +++ b/application/Core/FileManager/priv/FileUpdater/DirWatcherLinux.h @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #pragma once #include @@ -43,9 +43,9 @@ namespace FM private: static const int EVENT_SIZE; // Size of the event structure, not counting name. static const size_t BUF_LEN; // Reasonable guess as to size of 1024 events. - static const uint32_t EVENTS_OBS; // Inotify events catched for subdirectories. - static const uint32_t ROOT_EVENTS_OBS; // Inotify events catched for root directories. - static const uint32_t EVENTS_FILE; // Inotify events catched for files. + static const uint32_t EVENTS_OBS; // Inotify events caught for subdirectories. + static const uint32_t ROOT_EVENTS_OBS; // Inotify events caught for root directories. + static const uint32_t EVENTS_FILE; // Inotify events caught for files. static int addWatch(int fileDescriptor, const QString& path, uint32_t mask); @@ -59,7 +59,7 @@ namespace FM DirWatcherLinux* dwl; Dir* parent; - QHash childs; + QHash children; QString name; int wd; // Watch descriptor. }; diff --git a/application/Core/FileManager/priv/FileUpdater/DirWatcherWin.cpp b/application/Core/FileManager/priv/FileUpdater/DirWatcherWin.cpp index 44df975a..59b96783 100644 --- a/application/Core/FileManager/priv/FileUpdater/DirWatcherWin.cpp +++ b/application/Core/FileManager/priv/FileUpdater/DirWatcherWin.cpp @@ -214,7 +214,7 @@ const QList DirWatcherWin::waitEvent(int timeout, QListAction)); + L_WARN(QString("File event action unknown: %1").arg(notifyInformation->Action)); } if (!notifyInformation->NextEntryOffset) diff --git a/application/Core/FileManager/priv/FileUpdater/FileUpdater.cpp b/application/Core/FileManager/priv/FileUpdater/FileUpdater.cpp index d9ef3f3b..e5e9b779 100644 --- a/application/Core/FileManager/priv/FileUpdater/FileUpdater.cpp +++ b/application/Core/FileManager/priv/FileUpdater/FileUpdater.cpp @@ -166,8 +166,8 @@ void FileUpdater::prioritizeAFileToHash(File* file) this->remainingSizeToHash += file->getSize(); } - // Commmented to avoid this behavior: - // When a lot of unhashed tiny file are asked the hashing process will constently abort the current hashing file + // Commented to avoid this behavior: + // When a lot of unhashed tiny file are asked the hashing process will constantly abort the current hashing file // and will never finish it thus slow down the global hashing rate. // this->fileHasher.stop(); @@ -309,7 +309,7 @@ void FileUpdater::run() /** * It will take some files from 'filesWithoutHashesPrioritized' or 'fileWithoutHashes' and compute theirs hashes. - * The minimum duration of the compuation is equal to the setting 'minimum_duration_when_hashing'. + * The minimum duration of the computation is equal to the setting 'minimum_duration_when_hashing'. */ void FileUpdater::computeSomeHashes() { @@ -345,7 +345,7 @@ void FileUpdater::computeSomeHashes() try { int hashedAmount = 0; - gotAllHashes = this->fileHasher.start(nextFileToHash->asFileForHasher(), 1, &hashedAmount); // Be carreful of methods 'prioritizeAFileToHash(..)' and 'rmRoot(..)' called concurrently here. + gotAllHashes = this->fileHasher.start(nextFileToHash->asFileForHasher(), 1, &hashedAmount); // Be careful of methods 'prioritizeAFileToHash(..)' and 'rmRoot(..)' called concurrently here. this->remainingSizeToHash -= hashedAmount; this->updateHashingProgress(); } @@ -400,7 +400,7 @@ void FileUpdater::updateHashingProgress() /** * Stop the current hashing process or the next hashing process. - * The file is requeued. + * The file is re-queued. */ void FileUpdater::stopHashing() { @@ -492,7 +492,7 @@ void FileUpdater::scan(Entry* entry, bool addUnfinished) if (!file) { // Very special case : there is a file 'a' without File* in cache and a file 'a.unfinished'. - // This case occure when a file is redownloaded, the File* 'a' is renamed as 'a.unfinished' but the physical file 'a' + // This case occurs when a file is redownloaded, the File* 'a' is renamed as 'a.unfinished' but the physical file 'a' // is not deleted. File* unfinishedFile = currentDir->getFile(fileInfo.fileName().append(Global::getUnfinishedSuffix())); if (!unfinishedFile) @@ -559,7 +559,7 @@ void FileUpdater::stopScanning(Entry* entry) } /** - * Delete an entry and if it's a directory remove it and its sub childs from 'this->dirsToScan'. + * Delete an entry and if it's a directory remove it and its sub children from 'this->dirsToScan'. * It can't be used to remove a 'SharedDirectory', only the 'Cache' is able to do that. */ void FileUpdater::deleteEntry(Entry* entry) diff --git a/application/Core/FileManager/priv/FileUpdater/FileUpdater.h b/application/Core/FileManager/priv/FileUpdater/FileUpdater.h index 7662bf0a..1ef4d45b 100644 --- a/application/Core/FileManager/priv/FileUpdater/FileUpdater.h +++ b/application/Core/FileManager/priv/FileUpdater/FileUpdater.h @@ -99,7 +99,7 @@ namespace FM private: void computeFileCacheNbFiles(const Protos::FileCache::Hashes::Dir& dir); - const Protos::FileCache::Hashes* fileCache; ///< The hashes from the saved file cache. Used only temporally at the begining of 'run()'. + const Protos::FileCache::Hashes* fileCache; ///< The hashes from the saved file cache. Used only temporally at the beginning of 'run()'. int fileCacheNbFiles; int fileCacheNbFilesLoaded; }; diff --git a/application/Core/FileManager/priv/FileUpdater/WaitCondition.h b/application/Core/FileManager/priv/FileUpdater/WaitCondition.h index 0cb982f7..7d837aef 100644 --- a/application/Core/FileManager/priv/FileUpdater/WaitCondition.h +++ b/application/Core/FileManager/priv/FileUpdater/WaitCondition.h @@ -21,7 +21,7 @@ namespace FM { /** - * A wait condition used instead of the Qt implementation (QWaitCondidition) for + * A wait condition used instead of the Qt implementation (QWaitCondition) for * only one reason : to be able to use it natively with DirWatcher to wait. */ class WaitCondition @@ -37,7 +37,7 @@ namespace FM /** * Set the 'WaitCondition' in released state. * - The next call to wait will not block - * - If there is already a wait thread then it will be imediately released. + * - If there is already a wait thread then it will be immediately released. * Non-blocking call. */ virtual void release() = 0; diff --git a/application/Core/FileManager/priv/WordIndex/Node.h b/application/Core/FileManager/priv/WordIndex/Node.h index 03967904..a5bf6a81 100644 --- a/application/Core/FileManager/priv/WordIndex/Node.h +++ b/application/Core/FileManager/priv/WordIndex/Node.h @@ -169,7 +169,7 @@ void FM::Node::addItem(const QStringRef& word, const T& item) { child->items << item; } - else // The word is the begining of the the sub-part. + else // The word is the beginning of the the sub-part. { Node* newNode = new Node(word.toString(), item); child->part.remove(0, p); @@ -177,13 +177,13 @@ void FM::Node::addItem(const QStringRef& word, const T& item) newNode->children << child; } } - else if (p == child->part.size()) // The sub part is the begining of the word. + else if (p == child->part.size()) // The sub part is the beginning of the word. { child->addItem(word.string()->midRef(word.position() + p, word.size() - p), item); } else { - // The word and the sub part share at least one character from the begining. + // The word and the sub part share at least one character from the beginning. Node* newNodeSplit = new Node(word.string()->mid(word.position(), p)); child->part.remove(0, p); this->children.replace(i, newNodeSplit); diff --git a/application/Core/FileManager/priv/WordIndex/WordIndex.h b/application/Core/FileManager/priv/WordIndex/WordIndex.h index 450ffeb8..b9295462 100644 --- a/application/Core/FileManager/priv/WordIndex/WordIndex.h +++ b/application/Core/FileManager/priv/WordIndex/WordIndex.h @@ -46,7 +46,7 @@ namespace FM class WordIndex : public LM::ILoggable, Common::Uncopyable { public: - static const int MIN_WORD_SIZE_PARTIAL_MATCH; ///< During a search, the words which have a size below this value must match entirely, for exemple 'of' match "conspiracy of one" and not "offspring". + static const int MIN_WORD_SIZE_PARTIAL_MATCH; ///< During a search, the words which have a size below this value must match entirely, for example 'of' match "conspiracy of one" and not "offspring". static const int MIN_WORD_SIZE_PARTIAL_MATCH_KOREAN; WordIndex(); @@ -136,7 +136,7 @@ void FM::WordIndex::renameItem(const QStringList& oldWords, const QStringList } /** - * Return a an unordered list of 'NodeResult' matching the given word. If 'NodeResult::level' is 0 then the item matches entirely the given word otherwise (level is 1) the word match the begining of the indexed string. + * Return a an unordered list of 'NodeResult' matching the given word. If 'NodeResult::level' is 0 then the item matches entirely the given word otherwise (level is 1) the word match the beginning of the indexed string. * There is a particular case when the word length is below 'MIN_WORD_SIZE_PARTIAL_MATCH', see the comment associated to this constant for more information. */ template diff --git a/application/Core/NetworkListener/INetworkListener.h b/application/Core/NetworkListener/INetworkListener.h index 0fcd25d9..05091114 100644 --- a/application/Core/NetworkListener/INetworkListener.h +++ b/application/Core/NetworkListener/INetworkListener.h @@ -39,7 +39,7 @@ namespace NL /** * This is needed when sockets have to be rebound. - * On Windows after disable/enable the netowrk interface, the sockets have to be rebound. + * On Windows after disable/enable the network interface, the sockets have to be rebound. */ virtual void rebindSockets() = 0; diff --git a/application/Core/NetworkListener/priv/TCPListener.h b/application/Core/NetworkListener/priv/TCPListener.h index c013c793..a90ef56f 100644 --- a/application/Core/NetworkListener/priv/TCPListener.h +++ b/application/Core/NetworkListener/priv/TCPListener.h @@ -49,7 +49,7 @@ namespace NL quint16 currentPort; // TODO: count the number of connection per ip per second and - // blocked temporarely an ip with too much attempt. + // blocked temporarily an ip with too much attempt. // struct BlockedIPs // { // QHostAddress address; diff --git a/application/Core/NetworkListener/priv/Utils.cpp b/application/Core/NetworkListener/priv/Utils.cpp index 4ef549b6..a21ff558 100644 --- a/application/Core/NetworkListener/priv/Utils.cpp +++ b/application/Core/NetworkListener/priv/Utils.cpp @@ -90,11 +90,11 @@ QHostAddress Utils::getCurrentAddressToListenTo() QHostAddress Utils::getMulticastGroup() { const quint32 group = SETTINGS.get("multicast_group"); - QHostAddress currentAddressToListentTo = Utils::getCurrentAddressToListenTo(); + QHostAddress currentAddressToListenTo = Utils::getCurrentAddressToListenTo(); QByteArray channelHash = Common::Hasher::hash(SETTINGS.get("channel")).getByteArray(); - if (currentAddressToListentTo.protocol() == QAbstractSocket::IPv4Protocol) + if (currentAddressToListenTo.protocol() == QAbstractSocket::IPv4Protocol) return QHostAddress(group); else // IPv6. { diff --git a/application/Core/PeerManager/priv/Builder.cpp b/application/Core/PeerManager/priv/Builder.cpp index b5c4988b..efde4f4d 100644 --- a/application/Core/PeerManager/priv/Builder.cpp +++ b/application/Core/PeerManager/priv/Builder.cpp @@ -23,7 +23,7 @@ using namespace PM; #include /** - * Return a new instante of a PeerManager + * Return a new instance of a PeerManager */ QSharedPointer Builder::newPeerManager(QSharedPointer fileManager) { diff --git a/application/Core/PeerManager/priv/ConnectionPool.cpp b/application/Core/PeerManager/priv/ConnectionPool.cpp index f360d6b1..ce1f1ff8 100644 --- a/application/Core/PeerManager/priv/ConnectionPool.cpp +++ b/application/Core/PeerManager/priv/ConnectionPool.cpp @@ -169,7 +169,7 @@ QSharedPointer ConnectionPool::addNewSocket(QSharedPointerstartListening(); diff --git a/application/Core/RemoteControlManager/priv/RemoteConnection.cpp b/application/Core/RemoteControlManager/priv/RemoteConnection.cpp index 2c75c9ce..77a80f5c 100644 --- a/application/Core/RemoteControlManager/priv/RemoteConnection.cpp +++ b/application/Core/RemoteControlManager/priv/RemoteConnection.cpp @@ -235,9 +235,9 @@ void RemoteConnection::refresh() stats->set_upload_rate(uploadRate); // Network interfaces. - const QString& adressToListenStr = SETTINGS.get("listen_address"); - const QHostAddress adressToListen(adressToListenStr); - if (adressToListenStr.isEmpty()) + const QString& addressToListenStr = SETTINGS.get("listen_address"); + const QHostAddress addressToListen(addressToListenStr); + if (addressToListenStr.isEmpty()) state.set_listenany(static_cast(SETTINGS.get("listen_any"))); for (QListIterator i(this->interfaces); i.hasNext();) { @@ -261,7 +261,7 @@ void RemoteConnection::refresh() Protos::Common::Interface::Address* addressMess = interfaceMess->add_address(); Common::ProtoHelper::setStr(*addressMess, &Protos::Common::Interface::Address::set_address, address.toString()); addressMess->set_protocol(address.protocol() == QAbstractSocket::IPv6Protocol ? Protos::Common::Interface::Address::IPv6 : Protos::Common::Interface::Address::IPv4); - addressMess->set_listened(address == adressToListen); + addressMess->set_listened(address == addressToListen); } } } diff --git a/application/Core/RemoteControlManager/priv/RemoteConnection.h b/application/Core/RemoteControlManager/priv/RemoteConnection.h index c19323be..a8dfee03 100644 --- a/application/Core/RemoteControlManager/priv/RemoteConnection.h +++ b/application/Core/RemoteControlManager/priv/RemoteConnection.h @@ -118,7 +118,7 @@ namespace RCM Protos::GUI::EventLogMessages eventLogMessages; // The next log messages to send are buffered in this member. QTimer sendLogMessagesTimer; - bool waitForStateResult; // To avoid to send refresh messages when we are already waitting an acknowledgment for a refresh message. + bool waitForStateResult; // To avoid to send refresh messages when we are already waiting an acknowledgment for a refresh message. QTimer timerRefresh; QTimer timerCloseSocket; diff --git a/application/GUI/Browse/BrowseModel.cpp b/application/GUI/Browse/BrowseModel.cpp index ed5dcf8d..7f443d7d 100644 --- a/application/GUI/Browse/BrowseModel.cpp +++ b/application/GUI/Browse/BrowseModel.cpp @@ -347,7 +347,7 @@ void BrowseModel::synchronizeRoot(const Protos::Common::Entries& entries) int j = 0; // Root's children. for (int i = 0 ; i < entries.entry_size(); i++) { - // We've searching if the entry alredy exists. + // We've searching if the entry already exists. for (int j2 = j; j2 < this->root->getNbChildren(); j2++) { if (entries.entry(i).shared_entry().id().hash() == this->root->getChild(j2)->getItem().shared_entry().id().hash()) // ID's are equal -> same entry. diff --git a/application/GUI/BusyIndicator.cpp b/application/GUI/BusyIndicator.cpp index 73189a8f..d18af370 100644 --- a/application/GUI/BusyIndicator.cpp +++ b/application/GUI/BusyIndicator.cpp @@ -26,7 +26,7 @@ using namespace GUI; * @class GUI::BusyIndicator * * A widget to show there is a task currently running. - * It uses the 'QPalette::Hightlight' color to draw the widget. + * It uses the 'QPalette::Highlight' color to draw the widget. */ /** diff --git a/application/GUI/Chat/ChatModel.cpp b/application/GUI/Chat/ChatModel.cpp index 08a7e0c9..fad820c7 100644 --- a/application/GUI/Chat/ChatModel.cpp +++ b/application/GUI/Chat/ChatModel.cpp @@ -56,9 +56,9 @@ QString ChatModel::getRoomName() const } /** - * Returns the most revelant peers from the last messages. The peers which have replied to us are put first. + * Returns the most relevant peers from the last messages. The peers which have replied to us are put first. */ -QList> ChatModel::getSortedOtherPeersByRevelance() const +QList> ChatModel::getSortedOtherPeersByRelevance() const { QList> result; QSet processedPeers; diff --git a/application/GUI/Chat/ChatModel.h b/application/GUI/Chat/ChatModel.h index 0dfe5ae7..3c22db97 100644 --- a/application/GUI/Chat/ChatModel.h +++ b/application/GUI/Chat/ChatModel.h @@ -49,7 +49,7 @@ namespace GUI bool isMainChat() const; QString getRoomName() const; - QList> getSortedOtherPeersByRevelance() const; + QList> getSortedOtherPeersByRelevance() const; QString getLineStr(int row, bool withHTML = true) const; Common::Hash getPeerID(int row) const; diff --git a/application/GUI/Chat/ChatWidget.cpp b/application/GUI/Chat/ChatWidget.cpp index 0e7b0bf2..c4dbad7a 100644 --- a/application/GUI/Chat/ChatWidget.cpp +++ b/application/GUI/Chat/ChatWidget.cpp @@ -319,7 +319,7 @@ void ChatWidget::currentCharFormatChanged(const QTextCharFormat& charFormat) this->connectFormatWidgets(); } - else // Special case to avoid to reset the formatting when the cursor is put at the begining. + else // Special case to avoid to reset the formatting when the cursor is put at the beginning. { this->ui->txtMessage->disconnect(this, SIGNAL(currentCharFormatChanged(QTextCharFormat))); this->applyCurrentFormat(); @@ -719,7 +719,7 @@ void ChatWidget::init() connect(this->ui->butEmoticons, SIGNAL(toggled(bool)), this, SLOT(emoticonsButtonToggled(bool))); connect(this->ui->txtMessage, SIGNAL(wordTyped(int, QString)), this, SLOT(messageWordTyped(int, QString))); connect(this->emoticonsWidget, SIGNAL(hidden()), this, SLOT(emoticonsWindowHidden())); - connect(this->emoticonsWidget, SIGNAL(emoticonChoosen(QString, QString)), this, SLOT(insertEmoticon(QString, QString))); + connect(this->emoticonsWidget, SIGNAL(emoticonChosen(QString, QString)), this, SLOT(insertEmoticon(QString, QString))); connect(this->emoticonsWidget, SIGNAL(defaultThemeChanged(QString)), this, SLOT(defaultEmoticonThemeChanged(QString))); connect(this->autoComplete, &AutoComplete::stringAdded, this, &ChatWidget::autoCompleteStringAdded); @@ -821,7 +821,7 @@ void ChatWidget::activatePeerNameInsertionMode() this->autoComplete->show(); this->autoComplete->move(pos.x(), pos.y()); - this->autoComplete->setValues(this->chatModel.getSortedOtherPeersByRevelance()); + this->autoComplete->setValues(this->chatModel.getSortedOtherPeersByRelevance()); this->peerNameInsertionMode = true; } diff --git a/application/GUI/ColorBox.cpp b/application/GUI/ColorBox.cpp index 2abcb741..fd012129 100644 --- a/application/GUI/ColorBox.cpp +++ b/application/GUI/ColorBox.cpp @@ -26,7 +26,7 @@ using namespace GUI; /** * @class ColorBox - * A class to display a choosen color into a button. + * A class to display a chosen color into a button. */ ColorBox::ColorBox(QWidget* parent) : diff --git a/application/GUI/D-LAN_GUI.cpp b/application/GUI/D-LAN_GUI.cpp index a1cadfd4..73129883 100644 --- a/application/GUI/D-LAN_GUI.cpp +++ b/application/GUI/D-LAN_GUI.cpp @@ -51,7 +51,7 @@ D_LAN_GUI::D_LAN_GUI(int& argc, char* argv[]) : this->loadLanguage(langs.getBestMatchLanguage(Common::Languages::ExeType::GUI, current).filename); // If multiple instance isn't allowed we will test if a particular - // shared memory segment alreydy exists. There is actually no + // shared memory segment already exists. There is actually no // easy way to bring the already existing GUI windows to the front without // dirty polling. // Under linux the flag may persist after process crash. diff --git a/application/GUI/DownloadMenu.cpp b/application/GUI/DownloadMenu.cpp index 0e5c1a2b..a40523b3 100644 --- a/application/GUI/DownloadMenu.cpp +++ b/application/GUI/DownloadMenu.cpp @@ -30,7 +30,7 @@ using namespace GUI; * * Show the list of shared directory as a menu. * - The menu can be shown by calling 'show(..)'. - * - When the user select an action, the signal 'downloadTo(..)' is emmited. + * - When the user select an action, the signal 'downloadTo(..)' is emitted. * - Can be sub-classed to add some entries. In this case 'onShowMenu(..)' must be overridden. */ diff --git a/application/GUI/Downloads/DownloadsFlatModel.cpp b/application/GUI/Downloads/DownloadsFlatModel.cpp index 69a2b614..cc6876b8 100644 --- a/application/GUI/Downloads/DownloadsFlatModel.cpp +++ b/application/GUI/Downloads/DownloadsFlatModel.cpp @@ -187,7 +187,7 @@ bool DownloadsFlatModel::dropMimeData(const QMimeData* data, Qt::DropAction acti downloadIDs << this->downloads[currentRow].id(); } - // We remove the moved download from the list (not necessery but nicer for the user experience). + // We remove the moved download from the list (not necessary but nicer for the user experience). if (!rows.isEmpty()) { std::sort(rows.begin(), rows.end()); diff --git a/application/GUI/Downloads/DownloadsModel.cpp b/application/GUI/Downloads/DownloadsModel.cpp index bc1b5ded..a553e2a8 100644 --- a/application/GUI/Downloads/DownloadsModel.cpp +++ b/application/GUI/Downloads/DownloadsModel.cpp @@ -123,7 +123,7 @@ QVariant DownloadsModel::getData(const Protos::GUI::State::Download& download, c case Protos::GUI::State::Download::GOT_TOO_MUCH_DATA: toolTip += tr("Too much data received"); break; - case Protos::GUI::State::Download::HASH_MISSMATCH: + case Protos::GUI::State::Download::HASH_MISMATCH: toolTip += tr("Data received do not match the hash"); break; @@ -225,7 +225,7 @@ QList DownloadsModel::getNonFilteredDownloadIndices(const Protos::GUI::Stat case Protos::GUI::State::Download::FILE_IO_ERROR: case Protos::GUI::State::Download::FILE_NON_EXISTENT: case Protos::GUI::State::Download::GOT_TOO_MUCH_DATA: - case Protos::GUI::State::Download::HASH_MISSMATCH: + case Protos::GUI::State::Download::HASH_MISMATCH: case Protos::GUI::State::Download::REMOTE_SCANNING_IN_PROGRESS: case Protos::GUI::State::Download::LOCAL_SCANNING_IN_PROGRESS: case Protos::GUI::State::Download::UNABLE_TO_GET_ENTRIES: diff --git a/application/GUI/Emoticons/EmoticonsWidget.cpp b/application/GUI/Emoticons/EmoticonsWidget.cpp index 7939e352..4cbbd7e2 100644 --- a/application/GUI/Emoticons/EmoticonsWidget.cpp +++ b/application/GUI/Emoticons/EmoticonsWidget.cpp @@ -84,7 +84,7 @@ void EmoticonsWidget::setDefaultTheme(const QString& theme) void EmoticonsWidget::emoticonClicked() { SingleEmoticonWidget* emoticonWidget = dynamic_cast(this->sender()); - emit emoticonChoosen(emoticonWidget->getTheme(), emoticonWidget->getEmoticonName()); + emit emoticonChosen(emoticonWidget->getTheme(), emoticonWidget->getEmoticonName()); } void EmoticonsWidget::themeButtonToggled(bool checked) diff --git a/application/GUI/Emoticons/EmoticonsWidget.h b/application/GUI/Emoticons/EmoticonsWidget.h index cd5f9fce..ac968517 100644 --- a/application/GUI/Emoticons/EmoticonsWidget.h +++ b/application/GUI/Emoticons/EmoticonsWidget.h @@ -33,7 +33,7 @@ namespace GUI signals: void hidden(); - void emoticonChoosen(const QString& theme, const QString& emoticonName); + void emoticonChosen(const QString& theme, const QString& emoticonName); void defaultThemeChanged(const QString& theme); protected: diff --git a/application/GUI/Emoticons/SingleEmoticonWidget.cpp b/application/GUI/Emoticons/SingleEmoticonWidget.cpp index 0bdc5f1c..68212238 100644 --- a/application/GUI/Emoticons/SingleEmoticonWidget.cpp +++ b/application/GUI/Emoticons/SingleEmoticonWidget.cpp @@ -22,7 +22,7 @@ using namespace GUI; /** * @class GUI::SingleEmoticonWidget - * A widget which shows an emoticon image and its textual representions like ":)", ":-)", etc . . . + * A widget which shows an emoticon image and its textual representations like ":)", ":-)", etc . . . */ SingleEmoticonWidget::SingleEmoticonWidget(QWidget *parent) : diff --git a/application/GUI/MDI/MdiArea.cpp b/application/GUI/MDI/MdiArea.cpp index f12e3286..0bc875b4 100644 --- a/application/GUI/MDI/MdiArea.cpp +++ b/application/GUI/MDI/MdiArea.cpp @@ -79,7 +79,7 @@ void MdiArea::focusNthWindow(int num) } /** - * Called when the user explicitely wants to close the current window. + * Called when the user explicitly wants to close the current window. */ void MdiArea::closeCurrentWindow() { diff --git a/application/GUI/MDI/MdiWidget.cpp b/application/GUI/MDI/MdiWidget.cpp index 5901647d..be30ab42 100644 --- a/application/GUI/MDI/MdiWidget.cpp +++ b/application/GUI/MDI/MdiWidget.cpp @@ -22,7 +22,7 @@ using namespace GUI; /** * @class MDIWidget * The widget put into a MDI sub window in the MDI area may inherit from this class - * to have access to additionnal features. + * to have access to additional features. */ MdiWidget::MdiWidget(QWidget* parent) : diff --git a/application/GUI/MainWindow.cpp b/application/GUI/MainWindow.cpp index a8a1c7ae..89d6757b 100644 --- a/application/GUI/MainWindow.cpp +++ b/application/GUI/MainWindow.cpp @@ -152,7 +152,7 @@ void MainWindow::coreConnectionError(RCC::ICoreConnection::ConnectionErrorCode e error = tr("There is already a connection process in progress"); break; case RCC::ICoreConnection::RCC_ERROR_HOST_UNKOWN: - error = tr("The host is unknow"); + error = tr("The host is unknown"); break; case RCC::ICoreConnection::RCC_ERROR_HOST_TIMEOUT: error = tr("Host has timed out"); diff --git a/application/GUI/MainWindow.h b/application/GUI/MainWindow.h index 529a46a0..1010b02c 100644 --- a/application/GUI/MainWindow.h +++ b/application/GUI/MainWindow.h @@ -103,7 +103,7 @@ namespace GUI MdiArea* mdiArea; - QPoint dragPosition; // Used by custome styles. + QPoint dragPosition; // Used by custom styles. bool customStyleLoaded; Qt::WindowFlags initialWindowFlags; diff --git a/application/GUI/Peers/PeerListModel.cpp b/application/GUI/Peers/PeerListModel.cpp index 76b4df8f..1d464bd6 100644 --- a/application/GUI/Peers/PeerListModel.cpp +++ b/application/GUI/Peers/PeerListModel.cpp @@ -33,7 +33,7 @@ using namespace GUI; * @class PeerListModel * * The list of all peers. The list is built from the core state message, see the method 'newState(..)'. - * The list can be order by the amout of sharing or in an alphabetic way, see the method 'setSortType(..)'. + * The list can be order by the amount of sharing or in an alphabetic way, see the method 'setSortType(..)'. */ struct PeerListModel::Peer @@ -239,9 +239,9 @@ QVariant PeerListModel::data(const QModelIndex& index, int role) const toolTip.append('\n'); if (peer->status == Protos::GUI::State::Peer::MORE_RECENT_VERSION) - toolTip.append(tr("They protocol version is more recent and incompatible with ours. Upgrade you version!")).append('\n'); + toolTip.append(tr("Their protocol version is more recent and incompatible with ours. Upgrade you version!")).append('\n'); else if (peer->status == Protos::GUI::State::Peer::VERSION_OUTDATED) - toolTip.append(tr("They protocol version is outaded and incompatible with ours. They should upgrade their version!")).append('\n'); + toolTip.append(tr("Their protocol version is outdated and incompatible with ours. They should upgrade their version!")).append('\n'); if (!coreVersion.isEmpty()) toolTip += tr("Version %1\n").arg(coreVersion); diff --git a/application/GUI/Peers/PeersDock.cpp b/application/GUI/Peers/PeersDock.cpp index 040b1b4f..29d572ae 100644 --- a/application/GUI/Peers/PeersDock.cpp +++ b/application/GUI/Peers/PeersDock.cpp @@ -201,7 +201,7 @@ void PeersDock::sortPeersByNick() } /** - * Must be called only by a 'QAction' object whith a 'QColor' object as data. + * Must be called only by a 'QAction' object with a 'QColor' object as data. */ void PeersDock::colorizeSelectedPeer() { diff --git a/application/GUI/Search/SearchDock.cpp b/application/GUI/Search/SearchDock.cpp index 54fde8d4..2e4823d8 100644 --- a/application/GUI/Search/SearchDock.cpp +++ b/application/GUI/Search/SearchDock.cpp @@ -54,8 +54,8 @@ SearchDock::SearchDock(QSharedPointer coreConnection, QWid for (int i = 0; i < 5; i++) { - this->ui->cmbMinSize->addItem(Common::Constants::BINARY_PREFIXS[i]); - this->ui->cmbMaxSize->addItem(Common::Constants::BINARY_PREFIXS[i]); + this->ui->cmbMinSize->addItem(Common::Constants::BINARY_PREFIXES[i]); + this->ui->cmbMaxSize->addItem(Common::Constants::BINARY_PREFIXES[i]); } this->updateComboTypes(); diff --git a/application/GUI/Search/SearchUtils.cpp b/application/GUI/Search/SearchUtils.cpp index 961396d8..81cc37a2 100644 --- a/application/GUI/Search/SearchUtils.cpp +++ b/application/GUI/Search/SearchUtils.cpp @@ -69,11 +69,11 @@ QString SearchUtils::getExtensionText(Common::ExtensionCategory extension, bool { result.append(": ["); - bool begining = true; + bool beginning = true; foreach (QString e, Common::KnownExtensions::getExtensions(extension)) { - if (begining) - begining = false; + if (beginning) + beginning = false; else result.append(", "); diff --git a/application/GUI/Settings/SettingsWidget.cpp b/application/GUI/Settings/SettingsWidget.cpp index ffcf6ba7..873b66a7 100644 --- a/application/GUI/Settings/SettingsWidget.cpp +++ b/application/GUI/Settings/SettingsWidget.cpp @@ -252,7 +252,7 @@ void SettingsWidget::updateNetworkInterfaces(const Protos::GUI::State& state) nextInterface:; } - // Remove the non-existant interfaces. + // Remove the non-existent interfaces. for (QListIterator i(this->ui->scoInterfacesContent->children()); i.hasNext();) { QLabel* current = dynamic_cast(i.next()); @@ -290,12 +290,12 @@ void SettingsWidget::updateAddresses(const Protos::Common::Interface& interfaceM for (int i = 0; i < interfaceMess.address_size(); i++) { - const QString& addresseName = Common::ProtoHelper::getStr(interfaceMess.address(i), &Protos::Common::Interface::Address::address); + const QString& addressName = Common::ProtoHelper::getStr(interfaceMess.address(i), &Protos::Common::Interface::Address::address); for (QListIterator j(container->findChildren()); j.hasNext();) { QRadioButton* addressButton = j.next(); - if (addressButton->text() == addresseName) + if (addressButton->text() == addressName) { addressesNotUpdated.removeOne(addressButton); if (interfaceMess.address(i).listened()) @@ -306,7 +306,7 @@ void SettingsWidget::updateAddresses(const Protos::Common::Interface& interfaceM { // Address not found -> add a new one. - QRadioButton* newAddressButton = new QRadioButton(addresseName, container); + QRadioButton* newAddressButton = new QRadioButton(addressName, container); this->ui->grpAddressesToListenTo->addButton(newAddressButton); if (interfaceMess.address(i).listened()) newAddressButton->setChecked(true); @@ -316,7 +316,7 @@ void SettingsWidget::updateAddresses(const Protos::Common::Interface& interfaceM nextAddress:; } - // Remove the non-existant addresses. + // Remove the non-existent addresses. for (QListIterator i(container->findChildren()); i.hasNext();) { QRadioButton* current = i.next(); diff --git a/application/Protos/core_protocol.proto b/application/Protos/core_protocol.proto index cf2f63c4..59c131ed 100644 --- a/application/Protos/core_protocol.proto +++ b/application/Protos/core_protocol.proto @@ -153,7 +153,7 @@ message GetHashesResult { ERROR_UNKNOWN = 255; } Status status = 1; // If status != OK nb_hash is not set. - uint32 nb_hash = 2; // The number of hashe that will be sent. Only the unknown hashes are sent, not the total. Depend of 'GetHashes.file.chunk'. + uint32 nb_hash = 2; // The number of hashes that will be sent. Only the unknown hashes are sent, not the total. Depend of 'GetHashes.file.chunk'. } // For each hash, this message is sent. Only if GetHashesResult.status == OK. diff --git a/application/Protos/core_settings.proto b/application/Protos/core_settings.proto index e33be40f..585407e9 100644 --- a/application/Protos/core_settings.proto +++ b/application/Protos/core_settings.proto @@ -69,7 +69,7 @@ message Settings { uint32 udp_buffer_size = 66; // [default = 163840] (10 * 16KiB). uint32 max_number_of_search_result_to_send = 68; // [default = 300] uint32 max_number_of_result_shown = 69; // [default = 5000] For one search we accept a maximum of 5000 results. - string listen_address = 86; // [default = ""] If address is empty then listen to any adresses, in this case the protocol is given by 'listenAny'. + string listen_address = 86; // [default = ""] If address is empty then listen to any addresses, in this case the protocol is given by 'listenAny'. Common.Interface.Address.Protocol listen_any = 87; // [default = IPv6]. ///// ChatSystem ///// diff --git a/application/Protos/gui_protocol.proto b/application/Protos/gui_protocol.proto index 8b133322..39e36273 100644 --- a/application/Protos/gui_protocol.proto +++ b/application/Protos/gui_protocol.proto @@ -45,7 +45,7 @@ message State { FILE_IO_ERROR = 0x26; FILE_NON_EXISTENT = 0x27; GOT_TOO_MUCH_DATA = 0x28; - HASH_MISSMATCH = 0x29; + HASH_MISMATCH = 0x29; REMOTE_SCANNING_IN_PROGRESS = 0x31; // When a remote file or directory is being scanned it's not possible to browse it or download it. LOCAL_SCANNING_IN_PROGRESS = 0x33; // When a local directory is being scanned it's not possible to download into. @@ -233,7 +233,7 @@ message CoreSettings { SharedPaths shared_paths = 2; Common.TriState enable_integrity_check = 3; - string listen_address = 4; // [default = ""] If address is empty then listen to any adresses, in this case the protocol is given by 'listenAny'. + string listen_address = 4; // [default = ""] If address is empty then listen to any addresses, in this case the protocol is given by 'listenAny'. Common.Interface.Address.Protocol listen_any = 5; // [default = IPv6] } diff --git a/application/Tools/FileIndexer/OldNode.h b/application/Tools/FileIndexer/OldNode.h index f394e2b0..acf3b53f 100644 --- a/application/Tools/FileIndexer/OldNode.h +++ b/application/Tools/FileIndexer/OldNode.h @@ -58,7 +58,7 @@ void Old::NodeResult::intersect(QSet>& s1, const QSet inline bool operator<(const Old::NodeResult& nr1, const Old::NodeResult& nr2) @@ -112,7 +112,7 @@ namespace Old /** * Remove the item from the node. - * If the item doesn'exist nothing happen. + * If the item doesn't exist nothing happen. */ void rmItem(T item); diff --git a/application/Tools/FileIndexer/OldWordIndex.h b/application/Tools/FileIndexer/OldWordIndex.h index 96b4f073..134079a8 100644 --- a/application/Tools/FileIndexer/OldWordIndex.h +++ b/application/Tools/FileIndexer/OldWordIndex.h @@ -36,7 +36,7 @@ namespace Old template class WordIndex : Common::Uncopyable { - static const int MIN_WORD_SIZE_PARTIAL_MATCH; ///< During a search, the words which have a size below this value must match entirely, for exemple 'of' match "conspiracy of one" and not "offspring". + static const int MIN_WORD_SIZE_PARTIAL_MATCH; ///< During a search, the words which have a size below this value must match entirely, for example 'of' match "conspiracy of one" and not "offspring". public: WordIndex(); diff --git a/application/Tools/FileIndexer/main.cpp b/application/Tools/FileIndexer/main.cpp index 04b43113..ce4c393c 100644 --- a/application/Tools/FileIndexer/main.cpp +++ b/application/Tools/FileIndexer/main.cpp @@ -154,7 +154,7 @@ int main(int argc, char *argv[]) { if (argc >= 2) { - // WordIndex index; // If a word index of string is used the item corrsponds to fullpath + filename. + // WordIndex index; // If a word index of string is used the item corresponds to fullpath + filename. WordIndex index; for (int i = 1; i < argc; i++) diff --git a/application/Tools/LogViewer/MainWindow.cpp b/application/Tools/LogViewer/MainWindow.cpp index 90aff291..a3765536 100644 --- a/application/Tools/LogViewer/MainWindow.cpp +++ b/application/Tools/LogViewer/MainWindow.cpp @@ -92,7 +92,7 @@ void MainWindow::changeEvent(QEvent *e) } /** - * Ask the user to choose a directory. Trigged by the menu. + * Ask the user to choose a directory. Triggered by the menu. */ void MainWindow::openDir() { @@ -257,7 +257,7 @@ void MainWindow::closeCurrentFile() } /** - * Ask the log model wich are the known severities, modules and thread. Then refresh the + * Ask the log model which are the known severities, modules and thread. Then refresh the * widgets 'TooglableList'. */ void MainWindow::refreshFilters() diff --git a/application/Tools/LogViewer/TableLogItemDelegate.cpp b/application/Tools/LogViewer/TableLogItemDelegate.cpp index a47133a9..a4ff9d4f 100644 --- a/application/Tools/LogViewer/TableLogItemDelegate.cpp +++ b/application/Tools/LogViewer/TableLogItemDelegate.cpp @@ -28,7 +28,7 @@ * @class TableLogItemDelegate * * Override the paint method for table log items and - * draw them in fonction of their severity. + * draw them in function of their severity. */ TableLogItemDelegate::TableLogItemDelegate(QObject *parent) : diff --git a/application/Tools/LogViewer/TableLogModel.cpp b/application/Tools/LogViewer/TableLogModel.cpp index da1b8e23..1aab2c84 100644 --- a/application/Tools/LogViewer/TableLogModel.cpp +++ b/application/Tools/LogViewer/TableLogModel.cpp @@ -26,7 +26,7 @@ /** * @class TableLogModel * - * Acess to the file data log, read it and organize it for the views. + * Access to the file data log, read it and organize it for the views. */ TableLogModel::TableLogModel() : diff --git a/application/Tools/PasswordHasher/MainWindow.cpp b/application/Tools/PasswordHasher/MainWindow.cpp index 346d24e0..693ecfd1 100644 --- a/application/Tools/PasswordHasher/MainWindow.cpp +++ b/application/Tools/PasswordHasher/MainWindow.cpp @@ -114,7 +114,7 @@ void MainWindow::savePassword(const QString& directory) SETTINGS.set("remote_password", Common::Hasher::hashWithSalt(this->ui->txtPass1->text(), this->salt)); SETTINGS.set("salt", this->salt); - if (!SETTINGS.saveToACutomDirectory(directory)) + if (!SETTINGS.saveToACustomDirectory(directory)) QMessageBox::warning(this, "Error", "Error during saving"); else QMessageBox::information(this, "Password saved", "Password has been saved."); diff --git a/application/Tools/PasswordHasher/MainWindow.ui b/application/Tools/PasswordHasher/MainWindow.ui index 1a39d7d3..5fa7f8ac 100644 --- a/application/Tools/PasswordHasher/MainWindow.ui +++ b/application/Tools/PasswordHasher/MainWindow.ui @@ -107,7 +107,7 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Use this application to change the Core password. Once the password has been set a GUI can control the core remotly.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Use this application to change the Core password. Once the password has been set a GUI can control the core remotely.</span></p></body></html> Qt::RichText diff --git a/prototypes/04_UDP/Chat.h b/prototypes/04_UDP/Chat.h index 979cfccd..a0530b83 100644 --- a/prototypes/04_UDP/Chat.h +++ b/prototypes/04_UDP/Chat.h @@ -23,7 +23,7 @@ private slots: static const char TTL; ///< Time to live, see the UDP multicast documentation. static const int port; - static QHostAddress multicastIP; ///< A choosen multicast address channel used to send and received messages. + static QHostAddress multicastIP; ///< A chosen multicast address channel used to send and received messages. }; #endif diff --git a/prototypes/06_ConcurrentFileAccess/File.cpp b/prototypes/06_ConcurrentFileAccess/File.cpp index f56164c8..ea694e97 100644 --- a/prototypes/06_ConcurrentFileAccess/File.cpp +++ b/prototypes/06_ConcurrentFileAccess/File.cpp @@ -49,7 +49,7 @@ File::~File() /** * Write some bytes to the file at the given offset. - * If the buffer exceed the file size then only the begining of the buffer is + * If the buffer exceed the file size then only the beginning of the buffer is * used, the file is not resizing. */ bool File::write(const QByteArray& buffer, qint64 offset)