From 225575da50b1e7aa10c9b0c2b8d7a43b40621137 Mon Sep 17 00:00:00 2001
From: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
Date: Tue, 24 Jul 2018 16:50:26 -0400
Subject: [PATCH] fix spelling errors

Change-Id: I92ead715a1a8e47a71e53f223cd010a846f8821c
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
---
 INSTALL                                    | 4 ++--
 src/call.cpp                               | 4 ++--
 src/callmodel.cpp                          | 2 +-
 src/certificate.cpp                        | 2 +-
 src/contactmodel.cpp                       | 2 +-
 src/contactrequest.cpp                     | 2 +-
 src/conversationmodel.cpp                  | 2 +-
 src/credentialmodel.cpp                    | 2 +-
 src/database.h                             | 2 +-
 src/interfaces/itemmodelstateserializeri.h | 2 +-
 src/itembase.cpp                           | 2 +-
 src/personmodel.h                          | 2 +-
 src/phonedirectorymodel.cpp                | 2 +-
 src/private/vcardutils.cpp                 | 2 +-
 src/useractionmodel.cpp                    | 2 +-
 src/video/sourcemodel.cpp                  | 2 +-
 test/conversationmodeltester.cpp           | 2 +-
 test/datatransfertester.h                  | 2 +-
 18 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/INSTALL b/INSTALL
index 098a4b01..f965b5f1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -17,7 +17,7 @@ To install the appplication, type the following commands in a console, while in
 	mkdir -p build
 	cd build
 	cmake ..
-        	The following options are often usefull to append to the cmake line:
+        	The following options are often useful to append to the cmake line:
                 -DRING_BUILD_DIR=<daemon install location>
                 -DRING_XML_INTERFACES_DIR=<daemon dbus interface definitions directory>
                 -DCMAKE_INSTALL_PREFIX=<install location>
@@ -74,7 +74,7 @@ To run tests, you need to rebuild the application with these commands (from the
 	mkdir -p build-test
 	cd build-test
 	cmake .. -DENABLE_TEST=true
-        	The following options are often usefull to append to the cmake line:
+        	The following options are often useful to append to the cmake line:
                 -DRING_BUILD_DIR=<daemon install location>
                 -DRING_XML_INTERFACES_DIR=<daemon dbus interface definitions directory>
                 -DCMAKE_INSTALL_PREFIX=<install location>
diff --git a/src/call.cpp b/src/call.cpp
index 289459a3..b6a474b4 100644
--- a/src/call.cpp
+++ b/src/call.cpp
@@ -1088,7 +1088,7 @@ int MediaTypeInference::genId() {
 }
 
 /**
- * Everytime new ids are generated (that can be done some time), this map is
+ * Every time new ids are generated (that can be done some time), this map is
  * updated to map those type ids to Media::Type
  *
  * It could be extended to store some operations into lambdas too, but for
@@ -1227,7 +1227,7 @@ void Call::setPeerName(const QString& name)
 {
    d_ptr->m_PeerName = name;
 
-   // its possible that this is not set at the begining of a call, so we should update the CM here
+   // its possible that this is not set at the beginning of a call, so we should update the CM here
    if (peerContactMethod())
       peerContactMethod()->incrementAlternativeName(name, startTimeStamp());
 }
diff --git a/src/callmodel.cpp b/src/callmodel.cpp
index 1bd64eb1..e3832c0e 100644
--- a/src/callmodel.cpp
+++ b/src/callmodel.cpp
@@ -518,7 +518,7 @@ Call* CallModelPrivate::addIncomingCall(const QString& callId)
 {
    qDebug() << "New incoming call:" << callId;
 
-   // Since november 2015, calls are alowed to be declared with a state change
+   // Since november 2015, calls are allowed to be declared with a state change
    // if it has been done, then they should be ignored
    // contains can be true and contain nullptr if it was accessed without
    // contains() first
diff --git a/src/certificate.cpp b/src/certificate.cpp
index 60ae7157..923c67ad 100644
--- a/src/certificate.cpp
+++ b/src/certificate.cpp
@@ -892,7 +892,7 @@ bool Certificate::moveToDotCert() const
 /**
  * get the data by role selection
  * @param role define the role to select
- * @return a QVariant object, wich contains the selection
+ * @return a QVariant object, which contains the selection
  */
 QVariant
 Certificate::roleData(int role) const
diff --git a/src/contactmodel.cpp b/src/contactmodel.cpp
index 6b96c3cd..781de2e0 100644
--- a/src/contactmodel.cpp
+++ b/src/contactmodel.cpp
@@ -223,7 +223,7 @@ ContactModel::addContact(contact::Info contactInfo)
 
     switch (profile.type) {
     case profile::Type::TEMPORARY:
-        // NOTE: do not set profile::Type::RING, this has to be done when the daemon has emited contactAdded
+        // NOTE: do not set profile::Type::RING, this has to be done when the daemon has emitted contactAdded
 #ifndef ENABLE_TEST // The old LRC doesn't like mocks
         if (auto* account = AccountModel::instance().getById(owner.id.c_str()))
             account->sendContactRequest(URI(profile.uri.c_str()));
diff --git a/src/contactrequest.cpp b/src/contactrequest.cpp
index 54c2aad1..ae699c73 100644
--- a/src/contactrequest.cpp
+++ b/src/contactrequest.cpp
@@ -118,7 +118,7 @@ ContactRequest::block()
 /**
  * get the data by role selection
  * @param role define the role to select
- * @return a QVariant object, wich contains the selection
+ * @return a QVariant object, which contains the selection
  */
 QVariant
 ContactRequest::roleData(int role) const
diff --git a/src/conversationmodel.cpp b/src/conversationmodel.cpp
index 013a06a0..f905f04e 100644
--- a/src/conversationmodel.cpp
+++ b/src/conversationmodel.cpp
@@ -1769,7 +1769,7 @@ void
 ConversationModel::cancelTransfer(const std::string& convUid, uint64_t interactionId)
 {
     // For this action, we change interaction status before effective canceling as daemon will
-    // emit Finished event code immediatly (before leaving this method) in non-DBus mode.
+    // emit Finished event code immediately (before leaving this method) in non-DBus mode.
     auto conversationIdx = pimpl_->indexOf(convUid);
     interaction::Info itCopy;
     bool emitUpdated = false;
diff --git a/src/credentialmodel.cpp b/src/credentialmodel.cpp
index ee75eadb..b9896542 100644
--- a/src/credentialmodel.cpp
+++ b/src/credentialmodel.cpp
@@ -598,7 +598,7 @@ Qt::ItemFlags NewCredentialTypeModel::flags( const QModelIndex& index ) const
 
    bool avail = m_smAvailableInProtocol[t][m_pAccount->protocol()];
 
-#if 0 //TODO it mostly work, but make developement/testing harder, to enable in the last patch
+#if 0 //TODO it mostly work, but make development/testing harder, to enable in the last patch
    switch(t) {
       case Credential::Type::STUN:
          avail &= m_pAccount->isSipStunEnabled();
diff --git a/src/database.h b/src/database.h
index 320cee0c..b161e563 100644
--- a/src/database.h
+++ b/src/database.h
@@ -53,7 +53,7 @@ public:
     ~Database();
 
     /**
-     * A structure wich contains result(s) returned by a database query.
+     * A structure which contains result(s) returned by a database query.
      */
     struct Result {
         int nbrOfCols = -1; ///< store the number of columns returned.
diff --git a/src/interfaces/itemmodelstateserializeri.h b/src/interfaces/itemmodelstateserializeri.h
index e77b7c25..410f97da 100644
--- a/src/interfaces/itemmodelstateserializeri.h
+++ b/src/interfaces/itemmodelstateserializeri.h
@@ -60,7 +60,7 @@ public:
     virtual bool isChecked(const CollectionInterface* backend) const = 0;
 
     /**
-     * Allow to overload the default algoritm used to look for a default
+     * Allow to overload the default algorithm used to look for a default
      * collection to store something new.
      *
      * @param manager The likes of PersonModel::instance() or CategorizedHistoryModel::instance()
diff --git a/src/itembase.cpp b/src/itembase.cpp
index fa64013d..8b947e8e 100644
--- a/src/itembase.cpp
+++ b/src/itembase.cpp
@@ -50,7 +50,7 @@ bool ItemBase::save() const
    return d_ptr->m_pBackend->save(this);
 }
 
-///Show an implementation dependant dialog to edit the contact
+///Show an implementation dependent dialog to edit the contact
 bool ItemBase::edit()
 {
    if (!d_ptr->m_pBackend)
diff --git a/src/personmodel.h b/src/personmodel.h
index 0f9d875c..b6bc56c7 100644
--- a/src/personmodel.h
+++ b/src/personmodel.h
@@ -37,7 +37,7 @@ class PersonItemNode;
 //Typedef
 typedef QVector<Person*> PersonList;
 
-///PersonModel: Allow different way to handle contact without poluting the library
+///PersonModel: Allow different way to handle contact without polluting the library
 class LIB_EXPORT PersonModel :
    public QAbstractItemModel, public CollectionManagerInterface<Person> {
    #pragma GCC diagnostic push
diff --git a/src/phonedirectorymodel.cpp b/src/phonedirectorymodel.cpp
index 787272a8..fc25d7e3 100644
--- a/src/phonedirectorymodel.cpp
+++ b/src/phonedirectorymodel.cpp
@@ -813,7 +813,7 @@ void
 PhoneDirectoryModelPrivate::slotRegisteredNameFound(const Account* account, NameDirectory::LookupStatus status, const QString& address, const QString& name)
 {
     if (status != NameDirectory::LookupStatus::SUCCESS) {
-        // unsuccessfull lookup, so its useless
+        // unsuccessful lookup, so its useless
         return;
     }
     if (address.isEmpty() || name.isEmpty()) {
diff --git a/src/private/vcardutils.cpp b/src/private/vcardutils.cpp
index 28c957b3..fa20e2d5 100644
--- a/src/private/vcardutils.cpp
+++ b/src/private/vcardutils.cpp
@@ -256,7 +256,7 @@ void VCardUtils::addAddress(const Person::Address& addr)
          .arg(Delimiter::SEPARATOR_TOKEN)
          .arg(addr.type());
 
-   //First two fiels are left empty for now, they are for Postal box and Extended Address
+   //First two fields are left empty for now, they are for Postal box and Extended Address
    QString value = QString("%1%2%3%4%5%6%7%8%9%10%11")
          .arg(Delimiter::SEPARATOR_TOKEN)
          .arg(Delimiter::SEPARATOR_TOKEN)
diff --git a/src/useractionmodel.cpp b/src/useractionmodel.cpp
index 90714c96..96711008 100644
--- a/src/useractionmodel.cpp
+++ b/src/useractionmodel.cpp
@@ -290,7 +290,7 @@ const Matrix2D< UAMA, Account::Protocol, bool > UserActionModelPrivate::availabl
 /**
  * This matrix define if an action is stateless or stateful. The only state
  * supported is "checked", but when multiple items are selected, this can
- * cause a heterogenous bunch of checked and unchecked elements, this is
+ * cause a heterogeneous bunch of checked and unchecked elements, this is
  * called "TRISTATE".
  */
 #define ST UserActionModel::ActionStatfulnessLevel::
diff --git a/src/video/sourcemodel.cpp b/src/video/sourcemodel.cpp
index dd8e246f..8be47152 100644
--- a/src/video/sourcemodel.cpp
+++ b/src/video/sourcemodel.cpp
@@ -210,7 +210,7 @@ void Video::SourceModel::setUsedIndex(QString &deviceStr)
            .arg(DRing::Media::VideoProtocolPrefix::SEPARATOR);
         Video::Device* dev = Video::DeviceModel::instance().getDevice(deviceStr.replace(fullPrefix,""));
         if (dev == nullptr) {
-            // Device not found we dont know what camera is used
+            // Device not found we don't know what camera is used
             idx = ExtendedDeviceList::NONE;
             return;
         }
diff --git a/test/conversationmodeltester.cpp b/test/conversationmodeltester.cpp
index 651a6d4a..f4e9da12 100644
--- a/test/conversationmodeltester.cpp
+++ b/test/conversationmodeltester.cpp
@@ -743,7 +743,7 @@ ConversationModelTester::testPlaceCall()
     // Place a call
     accInfo_.conversationModel->placeCall(firstConversation.uid);
 
-    // Get first conversation again and make sure it isn't empty anymore (call suceeded)
+    // Get first conversation again and make sure it isn't empty anymore (call succeeded)
     conversations = accInfo_.conversationModel->allFilteredConversations();
     CPPUNIT_ASSERT(conversations.size() != 0);
     auto newConv = accInfo_.conversationModel->filteredConversation(0);
diff --git a/test/datatransfertester.h b/test/datatransfertester.h
index 7d3f9d72..27c16049 100644
--- a/test/datatransfertester.h
+++ b/test/datatransfertester.h
@@ -62,7 +62,7 @@ public:
      */
     void testReceivesImage5MbNoPref();
     /**
-     * Receives a new image with a prefedred dir, should accept tranfer
+     * Receives a new image with a prefedred dir, should accept transfer
      */
     void testReceivesImage5Mb();
     /**
-- 
GitLab