Browse Source

Fixed typos, spelling correction

adaptive-webui-19844
dartraiden 10 years ago
parent
commit
8ac83cfd42
  1. 6
      CODING_GUIDELINES.md
  2. 2
      README.os2
  3. 2
      dist/windows/README.txt
  4. 2
      install.os2
  5. 2
      src/core/bittorrent/private/bandwidthscheduler.cpp
  6. 10
      src/core/bittorrent/private/filterparserthread.cpp
  7. 4
      src/core/bittorrent/session.cpp
  8. 2
      src/core/bittorrent/torrenthandle.cpp
  9. 4
      src/core/net/dnsupdater.cpp
  10. 2
      src/core/net/smtp.cpp
  11. 2
      src/core/utils/misc.cpp
  12. 2
      src/core/utils/misc.h
  13. 2
      src/gui/mainwindow.cpp
  14. 2
      src/gui/options_imp.cpp
  15. 2
      src/gui/options_imp.h
  16. 2
      src/gui/properties/downloadedpiecesbar.h
  17. 4
      src/gui/properties/peerlistwidget.cpp
  18. 2
      src/gui/properties/pieceavailabilitybar.cpp
  19. 2
      src/gui/properties/pieceavailabilitybar.h
  20. 2
      src/gui/properties/propertieswidget.cpp
  21. 4
      src/gui/rss/rssdownloadrule.cpp
  22. 2
      src/gui/rss/rssfeed.cpp
  23. 2
      src/gui/statsdialog.cpp
  24. 2
      src/gui/torrentmodel.cpp
  25. 2
      src/lang/TRANSLATION_INSTRUCTIONS
  26. 4
      src/searchengine/nova/nova2.py
  27. 4
      src/searchengine/nova3/nova2.py
  28. 2
      src/searchengine/searchengine.cpp
  29. 4
      src/webui/btjson.cpp
  30. 2
      src/webui/www/public/css/Core.css
  31. 2
      src/webui/www/public/scripts/contextmenu.js

6
CODING_GUIDELINES.md

@ -13,7 +13,7 @@ int myFunction(int a) @@ -13,7 +13,7 @@ int myFunction(int a)
myClass::myClass(int *parent)
: m_parent(parent)
{
//initialiaze
//initialize
}
int myClass::myMethod(int a)
@ -119,10 +119,10 @@ Generally it will depend on the particular piece of code and would be determined @@ -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)

2
README.os2

@ -26,7 +26,7 @@ How to build @@ -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

2
dist/windows/README.txt vendored

@ -11,7 +11,7 @@ TRANSLATORS: @@ -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:

2
install.os2

@ -111,7 +111,7 @@ To install QBittorrent, do the following: @@ -111,7 +111,7 @@ To install QBittorrent, do the following:
=============
Please create bugreports at http://svn.netlabs.org/qtapps
Only bug reports with a reproducable bug are accepted. :-)
Only bug reports with a reproducible bug are accepted. :-)
5. CREDITS

2
src/core/bittorrent/private/bandwidthscheduler.cpp

@ -90,7 +90,7 @@ void BandwidthScheduler::start() @@ -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
src/core/bittorrent/private/filterparserthread.cpp

@ -76,11 +76,11 @@ int FilterParserThread::parseDATFilterFile(QString m_filePath, libt::ip_filter & @@ -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);
@ -168,7 +168,7 @@ int FilterParserThread::parseP2PFilterFile(QString m_filePath, libt::ip_filter & @@ -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);
@ -292,7 +292,7 @@ int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter & @@ -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));
@ -342,7 +342,7 @@ int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter & @@ -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));

4
src/core/bittorrent/session.cpp

@ -1028,7 +1028,7 @@ bool Session::addTorrent(QString source, const AddTorrentParams &params) @@ -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);
@ -1187,7 +1187,7 @@ bool Session::loadMetadata(const QString &magnetUri) @@ -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;

2
src/core/bittorrent/torrenthandle.cpp

@ -1038,7 +1038,7 @@ qreal TorrentHandle::realRatio() const @@ -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.

4
src/core/net/dnsupdater.cpp

@ -113,7 +113,7 @@ void DNSUpdater::ipRequestFinished(QNetworkReply *reply) @@ -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
@ -182,7 +182,7 @@ void DNSUpdater::ipUpdateFinished(QNetworkReply *reply) @@ -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

2
src/core/net/smtp.cpp

@ -171,7 +171,7 @@ void Smtp::readyRead() @@ -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) {

2
src/core/utils/misc.cpp

@ -449,7 +449,7 @@ QString Utils::Misc::parseHtmlLinks(const QString &raw_text) @@ -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

2
src/core/utils/misc.h

@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
#include <QUrl>
#include "core/types.h"
/* Miscellaneaous functions that can be useful */
/* Miscellaneous functions that can be useful */
namespace Utils
{

2
src/gui/mainwindow.cpp

@ -1281,7 +1281,7 @@ void MainWindow::createSystrayDelayed() @@ -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);
}
}

2
src/gui/options_imp.cpp

@ -251,7 +251,7 @@ options_imp::options_imp(QWidget *parent): @@ -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();

2
src/gui/options_imp.h

@ -48,7 +48,7 @@ private: @@ -48,7 +48,7 @@ private:
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();

2
src/gui/properties/downloadedpiecesbar.h

@ -46,7 +46,7 @@ class DownloadedPiecesBar: public QWidget { @@ -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;

4
src/gui/properties/peerlistwidget.cpp

@ -90,8 +90,8 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent): @@ -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))

2
src/gui/properties/pieceavailabilitybar.cpp

@ -52,7 +52,7 @@ QVector<float> PieceAvailabilityBar::intToFloatVector(const QVector<int> &vecin, @@ -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);

2
src/gui/properties/pieceavailabilitybar.h

@ -44,7 +44,7 @@ class PieceAvailabilityBar: public QWidget { @@ -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;

2
src/gui/properties/propertieswidget.cpp

@ -546,7 +546,7 @@ void PropertiesWidget::displayFilesListMenu(const QPoint&) { @@ -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())

4
src/gui/rss/rssdownloadrule.cpp

@ -83,7 +83,7 @@ bool RssDownloadRule::matches(const QString &article_title) const @@ -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();
@ -100,7 +100,7 @@ bool RssDownloadRule::matches(const QString &article_title) const @@ -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();

2
src/gui/rss/rssfeed.cpp

@ -296,7 +296,7 @@ RssArticleList RssFeed::unreadArticleListByDateDesc() const @@ -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

2
src/gui/statsdialog.cpp

@ -83,7 +83,7 @@ void StatsDialog::updateUI() { @@ -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;

2
src/gui/torrentmodel.cpp

@ -471,7 +471,7 @@ Qt::ItemFlags TorrentModel::flags(const QModelIndex &index) const @@ -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;
}

2
src/lang/TRANSLATION_INSTRUCTIONS

@ -39,4 +39,4 @@ When you run lupdate Transifex needs to know that the source is updated. When cr @@ -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
src/searchengine/nova/nova2.py

@ -52,7 +52,7 @@ CATEGORIES = {'all', 'movies', 'tv', 'music', 'games', 'anime', 'software', 'pic @@ -52,7 +52,7 @@ CATEGORIES = {'all', 'movies', 'tv', 'music', 'games', 'anime', 'software', 'pic
# 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():
@ -119,7 +119,7 @@ def run_search(engine_list): @@ -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

4
src/searchengine/nova3/nova2.py

@ -51,7 +51,7 @@ CATEGORIES = {'all', 'movies', 'tv', 'music', 'games', 'anime', 'software', 'pic @@ -51,7 +51,7 @@ CATEGORIES = {'all', 'movies', 'tv', 'music', 'games', 'anime', 'software', 'pic
# 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():
@ -118,7 +118,7 @@ def run_search(engine_list): @@ -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

2
src/searchengine/searchengine.cpp

@ -229,7 +229,7 @@ void SearchEngine::on_search_button_clicked() { @@ -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);

4
src/webui/btjson.cpp

@ -293,11 +293,11 @@ QByteArray btjson::getTorrents(QString filter, QString label, @@ -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

2
src/webui/www/public/css/Core.css

@ -14,7 +14,7 @@ Notes: @@ -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.
*/

2
src/webui/www/public/scripts/contextmenu.js

@ -263,7 +263,7 @@ var ContextMenu = new Class({ @@ -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;

Loading…
Cancel
Save