Skip to content

Commit

Permalink
Fixed typos, spelling correction
Browse files Browse the repository at this point in the history
  • Loading branch information
dartraiden committed Jun 14, 2015
1 parent f5b0008 commit 8ac83cf
Show file tree
Hide file tree
Showing 31 changed files with 44 additions and 44 deletions.
6 changes: 3 additions & 3 deletions CODING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int myFunction(int a)
myClass::myClass(int *parent)
: m_parent(parent)
{
//initialiaze
//initialize
}

int myClass::myMethod(int a)
Expand Down Expand Up @@ -119,10 +119,10 @@ Generally it will depend on the particular piece of code and would be determined

### 4. File encoding and line endings.###

UTF-8 and Unix-like line ending (LF). Unless some platform speficic files need other encodings/line endings.
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.

### 5. Initialization lists.###
Initialization lists should be vertical. This will allow for more easily readable diffs. The inilization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
```c++
myClass::myClass(int a, int b, int c, int d)
: priv_a(a)
Expand Down
2 changes: 1 addition & 1 deletion README.os2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ How to build
First you need to create the conf.pri file in the same dir as this readme.os2 is.
the conf.pri file has the following content:

##### conf.pri content beginn #####
##### conf.pri content begin #####
BINDIR = ./bin
INCDIR = ./include
LIBDIR = ./lib
Expand Down
2 changes: 1 addition & 1 deletion dist/windows/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TRANSLATORS:
5. Save the files with utf8 encoding and BOM.
6. Submit your changes: 1) as a pull request to the official git repo or
2) open an issue to the bugtracker and attach them or 3) via email or
4)the same way you provide the tranlations for qbt itself
4)the same way you provide the translations for qbt itself

PACKAGERS:

Expand Down
2 changes: 1 addition & 1 deletion install.os2
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ To install QBittorrent, do the following:
=============

Please create bugreports at http:https://svn.netlabs.org/qtapps
Only bug reports with a reproducable bug are accepted. :-)
Only bug reports with a reproducible bug are accepted. :-)


5. CREDITS
Expand Down
2 changes: 1 addition & 1 deletion src/core/bittorrent/private/bandwidthscheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void BandwidthScheduler::start()
if (new_mode != alt_bw_enabled)
emit switchToAlternativeMode(new_mode);

// Timeout regularly to accomodate for external system clock changes
// Timeout regularly to accommodate for external system clock changes
// eg from the user or from a timesync utility
QTimer::start(1500);
}
10 changes: 5 additions & 5 deletions src/core/bittorrent/private/filterparserthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ int FilterParserThread::parseDATFilterFile(QString m_filePath, libt::ip_filter &
// Ignoring commented lines
if (line.startsWith('#') || line.startsWith("//")) continue;

// Line should be splitted by commas
// Line should be split by commas
QList<QByteArray> partsList = line.split(',');
const uint nbElem = partsList.size();

// IP Range should be splitted by a dash
// IP Range should be split by a dash
QList<QByteArray> IPs = partsList.first().split('-');
if (IPs.size() != 2) {
qDebug("Ipfilter.dat: line %d is malformed.", nbLine);
Expand Down Expand Up @@ -168,7 +168,7 @@ int FilterParserThread::parseP2PFilterFile(QString m_filePath, libt::ip_filter &
// Ignoring commented lines
if (line.startsWith('#') || line.startsWith("//")) continue;

// Line is splitted by :
// Line is split by :
QList<QByteArray> partsList = line.split(':');
if (partsList.size() < 2) {
qDebug("p2p file: line %d is malformed.", nbLine);
Expand Down Expand Up @@ -292,7 +292,7 @@ int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter &
}

// Network byte order to Host byte order
// asio address_v4 contructor expects it
// asio address_v4 constructor expects it
// that way
libt::address_v4 first(ntohl(start));
libt::address_v4 last(ntohl(end));
Expand Down Expand Up @@ -342,7 +342,7 @@ int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter &
}

// Network byte order to Host byte order
// asio address_v4 contructor expects it
// asio address_v4 constructor expects it
// that way
libt::address_v4 first(ntohl(start));
libt::address_v4 last(ntohl(end));
Expand Down
4 changes: 2 additions & 2 deletions src/core/bittorrent/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ bool Session::addTorrent(QString source, const AddTorrentParams &params)

adjustLimits();

// use common 2nd step of torrent adddition
// use common 2nd step of torrent addition
libt::add_torrent_alert *alert = new libt::add_torrent_alert(handle, libt::add_torrent_params(), libt::error_code());
m_addingTorrents.insert(hash, AddTorrentData(params));
handleAddTorrentAlert(alert);
Expand Down Expand Up @@ -1187,7 +1187,7 @@ bool Session::loadMetadata(const QString &magnetUri)
InfoHash hash = magnet.hash();
QString name = magnet.name();

// We should not add tarrent if it already
// We should not add torrent if it already
// processed or adding to session
if (m_torrents.contains(hash)) return false;
if (m_addingTorrents.contains(hash)) return false;
Expand Down
2 changes: 1 addition & 1 deletion src/core/bittorrent/torrenthandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ qreal TorrentHandle::realRatio() const
if (all_time_download < total_done) {
// We have more data on disk than we downloaded
// either because the user imported the file
// or because of crash the download histroy was lost.
// or because of crash the download history was lost.
// Otherwise will get weird ratios
// eg when downloaded 1KB and uploaded 700MB of a
// 700MB torrent.
Expand Down
4 changes: 2 additions & 2 deletions src/core/net/dnsupdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void DNSUpdater::ipRequestFinished(QNetworkReply *reply)
}
}
else {
qWarning() << Q_FUNC_INFO << "Regular expression failed ot capture the IP address";
qWarning() << Q_FUNC_INFO << "Regular expression failed to capture the IP address";
}
}
// Clean up
Expand Down Expand Up @@ -182,7 +182,7 @@ void DNSUpdater::ipUpdateFinished(QNetworkReply *reply)
qWarning() << Q_FUNC_INFO << "Error:" << reply->errorString();
}
else {
// Pase reply
// Parse reply
processIPUpdateReply(reply->readAll());
}
// Clean up
Expand Down
2 changes: 1 addition & 1 deletion src/core/net/smtp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void Smtp::readyRead()
QByteArray line = m_buffer.left(pos);
m_buffer = m_buffer.mid(pos + 2);
qDebug() << "Response line:" << line;
// Extract reponse code
// Extract response code
QByteArray code = line.left(3);

switch (m_state) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/utils/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ QString Utils::Misc::parseHtmlLinks(const QString &raw_text)
"([a-zA-Z0-9\\?%=&/_\\.:#;-]+)" // everything to 1st non-URI char, must be at least one char after the previous dot (cannot use ".*" because it can be too greedy)
")"
"|"
"(" // case 2b no scheme, no TLD, must have at least 2 aphanum strings plus uncommon TLD string --> del.icio.us
"(" // case 2b no scheme, no TLD, must have at least 2 alphanum strings plus uncommon TLD string --> del.icio.us
"([a-zA-Z0-9_-]+\\.) {2,}" //2 or more domainpart. --> del.icio.
"[a-zA-Z]{2,}" //one ab (2 char or longer) --> us
"([a-zA-Z0-9\\?%=&/_\\.:#;-]*)" // everything to 1st non-URI char, maybe nothing in case of del.icio.us/path
Expand Down
2 changes: 1 addition & 1 deletion src/core/utils/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <QUrl>
#include "core/types.h"

/* Miscellaneaous functions that can be useful */
/* Miscellaneous functions that can be useful */

namespace Utils
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ void MainWindow::createSystrayDelayed()
// support systray icon
delete systrayCreator;
// Disable it in program preferences to
// avoid trying at earch startup
// avoid trying at each startup
Preferences::instance()->setSystrayIntegration(false);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/options_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ options_imp::options_imp(QWidget *parent):
#endif
// Disable apply Button
applyButton->setEnabled(false);
// Tab selection mecanism
// Tab selection mechanism
connect(tabSelection, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWidgetItem*)));
// Load Advanced settings
QVBoxLayout *adv_layout = new QVBoxLayout();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/options_imp.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class options_imp : public QDialog, private Ui_Preferences {
enum Tabs {TAB_UI, TAB_DOWNLOADS, TAB_CONNECTION, TAB_SPEED, TAB_BITTORRENT, TAB_WEBUI, TAB_ADVANCED};

public:
// Contructor / Destructor
// Constructor / Destructor
options_imp(QWidget *parent=0);
~options_imp();

Expand Down
2 changes: 1 addition & 1 deletion src/gui/properties/downloadedpiecesbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DownloadedPiecesBar: public QWidget {
private:
QImage m_image;

// I used values, bacause it should be possible to change colors in runtime
// I used values, because it should be possible to change colors in runtime

// background color
int m_bgColor;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/properties/peerlistwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent):
hideColumn(PeerListDelegate::COL_COUNT);
if (!Preferences::instance()->resolvePeerCountries())
hideColumn(PeerListDelegate::COUNTRY);
//To also migitate the above issue, we have to resize each column when
//its size is 0, because explicitely 'showing' the column isn't enough
//To also mitigate the above issue, we have to resize each column when
//its size is 0, because explicitly 'showing' the column isn't enough
//in the above scenario.
for (unsigned int i=0; i<PeerListDelegate::IP_HIDDEN; i++)
if (!columnWidth(i))
Expand Down
2 changes: 1 addition & 1 deletion src/gui/properties/pieceavailabilitybar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ QVector<float> PieceAvailabilityBar::intToFloatVector(const QVector<int> &vecin,

const int maxElement = *std::max_element(vecin.begin(), vecin.end());

// qMax bacause in normalization we don't want divide by 0
// qMax because in normalization we don't want divide by 0
// if maxElement == 0 check will be disabled please enable this line:
// const int maxElement = qMax(*std::max_element(avail.begin(), avail.end()), 1);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/properties/pieceavailabilitybar.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PieceAvailabilityBar: public QWidget {
private:
QImage m_image;

// I used values, bacause it should be possible to change colors in runtime
// I used values, because it should be possible to change colors in runtime

// background color
int m_bgColor;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/properties/propertieswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ void PropertiesWidget::displayFilesListMenu(const QPoint&) {
}
// Call menu
const QAction *act = myFilesLlistMenu.exec(QCursor::pos());
// The selected torrent might have dissapeared during exec()
// The selected torrent might have disappeared during exec()
// from the current view thus leaving invalid indices.
const QModelIndex index = *(selectedRows.begin());
if (!index.isValid())
Expand Down
4 changes: 2 additions & 2 deletions src/gui/rss/rssdownloadrule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ bool RssDownloadRule::matches(const QString &article_title) const
if (ep.endsWith('-')) { // Infinite range
int epOurs = ep.left(ep.size() - 1).toInt();

// Extract partial match from article and ocmpare as digits
// Extract partial match from article and compare as digits
pos = reg.indexIn(article_title);
if (pos != -1) {
int epTheirs = reg.cap(1).toInt();
Expand All @@ -100,7 +100,7 @@ bool RssDownloadRule::matches(const QString &article_title) const
int epOursFirst = range.first().toInt();
int epOursLast = range.last().toInt();

// Extract partial match from article and ocmpare as digits
// Extract partial match from article and compare as digits
pos = reg.indexIn(article_title);
if (pos != -1) {
int epTheirs = reg.cap(1).toInt();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/rss/rssfeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ RssArticleList RssFeed::unreadArticleListByDateDesc() const
return unread_news;
}

// download the icon from the adress
// download the icon from the address
QString RssFeed::iconUrl() const
{
// XXX: This works for most sites but it is not perfect
Expand Down
2 changes: 1 addition & 1 deletion src/gui/statsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void StatsDialog::updateUI() {
ui->labelTotalBuf->setText(Utils::Misc::friendlyUnit(cs.totalUsedBuffers() * 16 * 1024));
// Disk overload (100%) equivalent
// From lt manual: disk_write_queue and disk_read_queue are the number of peers currently waiting on a disk write or disk read
// to complete before it receives or sends any more data on the socket. It'a a metric of how disk bound you are.
// to complete before it receives or sends any more data on the socket. It's a metric of how disk bound you are.

// num_peers is not reliable (adds up peers, which didn't even overcome tcp handshake)
quint32 peers = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/torrentmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ Qt::ItemFlags TorrentModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
return 0;
// Explicitely mark as editable
// Explicitly mark as editable
return QAbstractListModel::flags(index) | Qt::ItemIsEditable;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lang/TRANSLATION_INSTRUCTIONS
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ When you run lupdate Transifex needs to know that the source is updated. When cr
you should go to the website, select the resource and hit "edit resource". From there you should update the
"Source file URL". It should point to the exact file in the github repository(eg src/lang/qbittorrent_en.ts). Be sure to copy
the 'raw' link presented by github and not the regular one. This will make Transifex fetch automatically the source file
from the repo(maybe once a day). If you want to instantly update the resouce then on the correct branch run "tx push -s"
from the repo (maybe once a day). If you want to instantly update the resource then on the correct branch run "tx push -s"
4 changes: 2 additions & 2 deletions src/searchengine/nova/nova2.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# a space-free string as parameter (ex. "family+guy")
# it should call prettyPrinter() with a dict as parameter.
# The keys in the dict must be: link,name,size,seeds,leech,engine_url
# As a convention, try to list results by decrasing number of seeds or similar
# As a convention, try to list results by decreasing number of seeds or similar
################################################################################

def initialize_engines():
Expand Down Expand Up @@ -119,7 +119,7 @@ def run_search(engine_list):
@param engine_list List with engine, query and category
@retval False if any exceptions occured
@retval False if any exceptions occurred
@retval True otherwise
"""
engine, what, cat = engine_list
Expand Down
4 changes: 2 additions & 2 deletions src/searchengine/nova3/nova2.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
# a space-free string as parameter (ex. "family+guy")
# it should call prettyPrinter() with a dict as parameter.
# The keys in the dict must be: link,name,size,seeds,leech,engine_url
# As a convention, try to list results by decrasing number of seeds or similar
# As a convention, try to list results by decreasing number of seeds or similar
################################################################################

def initialize_engines():
Expand Down Expand Up @@ -118,7 +118,7 @@ def run_search(engine_list):
@param engine_list List with engine, query and category
@retval False if any exceptions occured
@retval False if any exceptions occurred
@retval True otherwise
"""
engine, what, cat = engine_list
Expand Down
2 changes: 1 addition & 1 deletion src/searchengine/searchengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void SearchEngine::on_search_button_clicked() {
no_search_results = true;
nb_search_results = 0;
search_result_line_truncated.clear();
//on change le texte du label courrant
// Changing the text of the current label
currentSearchTab->getCurrentLabel()->setText(tr("Results")+" <i>(0)</i>:");
// Launch search
searchProcess->start("python", params, QIODevice::ReadOnly);
Expand Down
4 changes: 2 additions & 2 deletions src/webui/btjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ QByteArray btjson::getTorrents(QString filter, QString label,
* - "seq_dl": Torrent sequential download state
* - "f_l_piece_prio": Torrent first last piece priority state
* Server state map may contain the following keys:
* - "connection_status": conection status
* - "connection_status": connection status
* - "dht_nodes": DHT nodes count
* - "dl_info_data": bytes downloaded
* - "dl_info_speed": download speed
* - "dl_rate_limit: downlaod rate limit
* - "dl_rate_limit: download rate limit
* - "up_info_data: bytes uploaded
* - "up_info_speed: upload speed
* - "up_rate_limit: upload speed limit
Expand Down
2 changes: 1 addition & 1 deletion src/webui/www/public/css/Core.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Notes:
CSS rules in this file:
1. Rules required by all MochaUI components or are shared by more than one.
2. Theme specific ajustments to plugin styles.
2. Theme specific adjustments to plugin styles.
3. Miscellaneous rules that have no better place to go.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/webui/www/public/scripts/contextmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ var ContextMenu = new Class({
return this;
},

//diable the entire menu
//disable the entire menu
disable: function() {
this.options.disabled = true;
return this;
Expand Down

0 comments on commit 8ac83cf

Please sign in to comment.