From: Mike Gelfand Date: Fri, 2 Jan 2015 11:15:31 +0000 (+0000) Subject: Replace tabs with spaces; remove trailing spaces X-Git-Tag: 2.90~264 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=440f482d0107e917f8181f2ce1ffcd17b79563d3;p=transmission Replace tabs with spaces; remove trailing spaces --- diff --git a/daemon/daemon.c b/daemon/daemon.c index bb987cf91..8f741a499 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -389,9 +389,9 @@ reportStatus (void) const double dn = tr_sessionGetRawSpeed_KBps (mySession, TR_DOWN); if (up>0 || dn>0) - sd_notifyf (0, "STATUS=Uploading %.2f KBps, Downloading %.2f KBps.\n", up, dn); + sd_notifyf (0, "STATUS=Uploading %.2f KBps, Downloading %.2f KBps.\n", up, dn); else - sd_notify (0, "STATUS=Idle.\n"); + sd_notify (0, "STATUS=Idle.\n"); } static void @@ -574,7 +574,7 @@ main (int argc, char ** argv) exit (1); } - sd_notifyf (0, "MAINPID=%d\n", (int)getpid()); + sd_notifyf (0, "MAINPID=%d\n", (int)getpid()); /* setup event state */ ev_base = event_base_new(); @@ -681,7 +681,7 @@ main (int argc, char ** argv) if (event_base_dispatch(ev_base) == -1) { tr_logAddError("Failed to launch daemon event loop: %s", tr_strerror(errno)); - goto cleanup; + goto cleanup; } cleanup: diff --git a/daemon/remote.c b/daemon/remote.c index 91b5b6912..84e01b8db 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1765,7 +1765,7 @@ tr_curl_easy_init (struct evbuffer * writebuf) if (UseSSL) { curl_easy_setopt (curl, CURLOPT_SSL_VERIFYHOST, 0); /* do not verify subject/hostname */ - curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0); /* since most certs will be self-signed, do not verify against CA */ + curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0); /* since most certs will be self-signed, do not verify against CA */ } if (sessionId) { char * h = tr_strdup_printf ("%s: %s", TR_RPC_SESSION_ID_HEADER, sessionId); diff --git a/gtk/Makefile.am b/gtk/Makefile.am index c0924aeac..9a38cdab0 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -110,15 +110,15 @@ Productivity_DATA = $(DESKTOP_FILES) icon_DATA = transmission.png icondir = $(datadir)/pixmaps -UI_FILES = transmission-ui.xml +UI_FILES = transmission-ui.xml -transmission-resources.c: transmission.gresource.xml $(UI_FILES) +transmission-resources.c: transmission.gresource.xml $(UI_FILES) $(AM_V_GEN)glib-compile-resources --target=$@ --sourcedir=$(srcdir) \ - --generate-source --c-name transmission $< + --generate-source --c-name transmission $< -transmission-resources.h: transmission.gresource.xml $(UI_FILES) +transmission-resources.h: transmission.gresource.xml $(UI_FILES) $(AM_V_GEN)glib-compile-resources --target=$@ --sourcedir=$(srcdir) \ - --generate-header --c-name transmission $< + --generate-header --c-name transmission $< CLEANFILES += \ transmission-resources.c \ diff --git a/gtk/main.c b/gtk/main.c index ddfc1f443..0a8882caf 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -64,7 +64,7 @@ #define SHOW_LICENSE static const char * LICENSE = "Copyright 2005-2014. All code is copyrighted by the respective authors.\n" - "\n" + "\n" "Transmission can be redistributed and/or modified under the terms of the " "GNU GPL versions 2 or 3 or by any future license endorsed by Mnemosyne LLC.\n" "\n" @@ -468,7 +468,7 @@ on_rpc_changed (tr_session * session G_GNUC_UNUSED, data->type = type; data->torrent_id = tr_torrentId (tor); gdk_threads_add_idle (on_rpc_changed_idle, data); - + return TR_RPC_NOREMOVE; } diff --git a/gtk/transmission-gtk.desktop.in b/gtk/transmission-gtk.desktop.in index 95e345e38..51ee8b771 100644 --- a/gtk/transmission-gtk.desktop.in +++ b/gtk/transmission-gtk.desktop.in @@ -12,7 +12,7 @@ StartupNotify=true MimeType=application/x-bittorrent;x-scheme-handler/magnet; Categories=Network;FileTransfer;P2P;GTK; X-Ubuntu-Gettext-Domain=transmission -X-AppInstall-Keywords=torrent +X-AppInstall-Keywords=torrent Actions=Pause;Minimize; [Desktop Action Pause] diff --git a/gtk/util.h b/gtk/util.h index 30788c354..5a239d1d4 100644 --- a/gtk/util.h +++ b/gtk/util.h @@ -48,7 +48,7 @@ extern const char * speed_T_str; \ return q; \ } -#endif +#endif /* macro to shut up "unused parameter" warnings */ diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index dee3a8500..96a05eab2 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -1351,7 +1351,7 @@ on_scrape_done (const tr_scrape_response * response, void * vsession) if (!response->did_connect) { on_scrape_error (session, tier, _("Could not connect to tracker")); - } + } else if (response->did_timeout) { on_scrape_error (session, tier, _("Tracker did not respond")); diff --git a/libtransmission/libtransmission-test.c b/libtransmission/libtransmission-test.c index f3b5596df..a42a2a635 100644 --- a/libtransmission/libtransmission-test.c +++ b/libtransmission/libtransmission-test.c @@ -311,7 +311,7 @@ libttest_zero_torrent_init (tr_session * session) tr_torrent * tor; tr_ctor * ctor; - /* + /* 1048576 files-filled-with-zeroes/1048576 4096 files-filled-with-zeroes/4096 512 files-filled-with-zeroes/512 @@ -388,7 +388,7 @@ libttest_zero_torrent_populate (tr_torrent * tor, bool complete) assert (path != NULL); err = errno; assert (tr_sys_path_exists (path, NULL)); - errno = err; + errno = err; tr_free (path); } diff --git a/libtransmission/log.c b/libtransmission/log.c index ca41a908d..5f55ab6f0 100644 --- a/libtransmission/log.c +++ b/libtransmission/log.c @@ -151,7 +151,7 @@ tr_logGetTimeStr (char * buf, int buflen) seconds = tv.tv_sec; tr_localtime_r (&seconds, &now_tm); - strftime (tmp, sizeof (tmp), "%Y-%m-%d %H:%M:%S.%%03d %Z", &now_tm); + strftime (tmp, sizeof (tmp), "%Y-%m-%d %H:%M:%S.%%03d %Z", &now_tm); milliseconds = tv.tv_usec / 1000; tr_snprintf (buf, buflen, tmp, milliseconds); diff --git a/libtransmission/makemeta-test.c b/libtransmission/makemeta-test.c index f8dc78c61..76e26c81a 100644 --- a/libtransmission/makemeta-test.c +++ b/libtransmission/makemeta-test.c @@ -135,7 +135,7 @@ test_single_directory_impl (const tr_tracker_info * trackers, size_t totalSize; size_t i; char* tmpstr; - + /* set up our local test sandbox */ sandbox = libtest_sandbox_create(); @@ -212,7 +212,7 @@ test_single_directory_impl (const tr_tracker_info * trackers, return 0; } - + static int test_single_directory_random_payload_impl (const tr_tracker_info * trackers, const size_t trackerCount, diff --git a/libtransmission/metainfo-test.c b/libtransmission/metainfo-test.c index b5e44527b..82804fdec 100644 --- a/libtransmission/metainfo-test.c +++ b/libtransmission/metainfo-test.c @@ -96,7 +96,7 @@ test_metainfo (void) return 0; } - + int main (void) { diff --git a/libtransmission/move-test.c b/libtransmission/move-test.c index 64ae22f15..3de39fbc5 100644 --- a/libtransmission/move-test.c +++ b/libtransmission/move-test.c @@ -65,7 +65,7 @@ test_incomplete_dir_threadfunc (void * vdata) tr_torrentGotBlock (data->tor, data->block); data->done = true; } - + static int test_incomplete_dir_impl (const char * incomplete_dir, const char * download_dir) { @@ -179,7 +179,7 @@ test_set_location (void) session = libttest_session_init (NULL); target_dir = tr_buildPath (tr_sessionGetConfigDir (session), "target", NULL); tr_sys_dir_create (target_dir, TR_SYS_DIR_CREATE_PARENTS, 0777, NULL); - + /* init a torrent. */ tor = libttest_zero_torrent_init (session); libttest_zero_torrent_populate (tor, true); diff --git a/libtransmission/net.h b/libtransmission/net.h index a85053980..1f53c6dd8 100644 --- a/libtransmission/net.h +++ b/libtransmission/net.h @@ -165,7 +165,7 @@ const unsigned char *tr_globalIPv6 (void); #if defined (_WIN32) && !defined (QT_DLL) /* The QT exclusion is because something clashes whith the next include */ -#include /* socklen_t */ +#include /* socklen_t */ #endif diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index bf96d4b89..2eff21d69 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -3281,7 +3281,7 @@ getReconnectIntervalSecs (const struct peer_atom * atom, const time_t now) /* penalize peers that were unreachable the last time we tried */ if (unreachable) step += 2; - + switch (step) { case 0: sec = 0; break; diff --git a/libtransmission/peer-mgr.h b/libtransmission/peer-mgr.h index 924215be0..b392f31f2 100644 --- a/libtransmission/peer-mgr.h +++ b/libtransmission/peer-mgr.h @@ -183,7 +183,7 @@ void tr_peerMgrGotBadPiece (tr_torrent * tor, void tr_peerMgrPieceCompleted (tr_torrent * tor, tr_piece_index_t pieceIndex); - + /* @} */ diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index 5d8998c5b..8e656bd69 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -690,7 +690,7 @@ updateFastSet (tr_peerMsgs * msgs UNUSED) **** ACTIVE ***/ -static bool +static bool tr_peerMsgsCalculateActive (const tr_peerMsgs * msgs, tr_direction direction) { bool is_active; @@ -1829,7 +1829,7 @@ updateDesiredRequestCount (tr_peerMsgs * msgs) /* honor the session limits, if enabled */ if (tr_torrentUsesSessionLimits (torrent) && - tr_sessionGetActiveSpeedLimit_Bps (torrent->session, TR_PEER_TO_CLIENT, &irate_Bps)) + tr_sessionGetActiveSpeedLimit_Bps (torrent->session, TR_PEER_TO_CLIENT, &irate_Bps)) rate_Bps = MIN (rate_Bps, irate_Bps); /* use this desired rate to figure out how @@ -2469,7 +2469,7 @@ pexPulse (evutil_socket_t foo UNUSED, short bar UNUSED, void * vmsgs) static bool peermsgs_is_transferring_pieces (const struct tr_peer * peer, uint64_t now, - tr_direction direction, + tr_direction direction, unsigned int * setme_Bps) { unsigned int Bps = 0; diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c index b31ab9a48..6bc6cd83a 100644 --- a/libtransmission/platform-quota.c +++ b/libtransmission/platform-quota.c @@ -253,13 +253,13 @@ getquota (const char * device) if (quotactl(device, QCMD(Q_GETQUOTA, USRQUOTA), getuid(), (caddr_t) &dq) == 0) { #elif defined(__sun) - struct quotctl op; - int fd = open(device, O_RDONLY); - if (fd < 0) - return -1; - op.op = Q_GETQUOTA; - op.uid = getuid(); - op.addr = (caddr_t) &dq; + struct quotctl op; + int fd = open(device, O_RDONLY); + if (fd < 0) + return -1; + op.op = Q_GETQUOTA; + op.uid = getuid(); + op.addr = (caddr_t) &dq; if (ioctl(fd, Q_QUOTACTL, &op) == 0) { close(fd); diff --git a/libtransmission/quark.c b/libtransmission/quark.c index e24d50dbc..e45202d49 100644 --- a/libtransmission/quark.c +++ b/libtransmission/quark.c @@ -488,7 +488,7 @@ tr_quark_new (const void * str, size_t len) return ret; } - + const char * tr_quark_get_string (tr_quark q, size_t * len) { diff --git a/libtransmission/rename-test.c b/libtransmission/rename-test.c index ce7975c2b..94d4bc0b9 100644 --- a/libtransmission/rename-test.c +++ b/libtransmission/rename-test.c @@ -117,7 +117,7 @@ create_torrent_from_base64_metainfo (tr_ctor * ctor, const char * metainfo_base6 assert (!err); /* cleanup */ - tr_free (metainfo); + tr_free (metainfo); return tor; } @@ -183,7 +183,7 @@ test_single_filename_torrent (void) **** Now try a rename that should succeed ***/ - tmpstr = tr_buildPath (tor->currentDir, "hello-world.txt", NULL); + tmpstr = tr_buildPath (tor->currentDir, "hello-world.txt", NULL); check (tr_sys_path_exists (tmpstr, NULL)); check_streq ("hello-world.txt", tr_torrentName(tor)); check_int_eq (0, torrentRenameAndWait (tor, tor->info.name, "foobar")); @@ -193,7 +193,7 @@ test_single_filename_torrent (void) check_streq ("foobar", tr_torrentName(tor)); /* confirm the torrent's name is now 'foobar' */ check_streq ("foobar", tor->info.files[0].name); /* confirm the file's name is now 'foobar' in our struct */ check (strstr (tor->info.torrent, "foobar") == NULL); /* confirm the name in the .torrent file hasn't changed */ - tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL); + tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL); check (tr_sys_path_exists (tmpstr, NULL)); /* confirm the file's name is now 'foobar' on the disk */ tr_free (tmpstr); check (testFileExistsAndConsistsOfThisString (tor, 0, "hello, world!\n")); /* confirm the contents are right */ @@ -209,7 +209,7 @@ test_single_filename_torrent (void) **** ...and rename it back again ***/ - tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL); + tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL); check (tr_sys_path_exists (tmpstr, NULL)); check_int_eq (0, torrentRenameAndWait (tor, "foobar", "hello-world.txt")); check (!tr_sys_path_exists (tmpstr, NULL)); @@ -501,7 +501,7 @@ test_partial_file (void) const char * strings[3]; /*** - **** create our test torrent with an incomplete .part file + **** create our test torrent with an incomplete .part file ***/ tor = libttest_zero_torrent_init (session); diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c index 505408ace..aa0cb5c37 100644 --- a/libtransmission/rpc-server.c +++ b/libtransmission/rpc-server.c @@ -936,7 +936,7 @@ missing_settings_key (const tr_quark q) { const char * str = tr_quark_get_string (q, NULL); tr_logAddNamedError (MY_NAME, _("Couldn't find settings key \"%s\""), str); -} +} tr_rpc_server * tr_rpcInit (tr_session * session, tr_variant * settings) diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c index 33621e93f..3b369fb1b 100644 --- a/libtransmission/rpcimpl.c +++ b/libtransmission/rpcimpl.c @@ -251,14 +251,14 @@ queueMoveBottom (tr_session * session, return NULL; } -static int -compareTorrentByQueuePosition (const void * va, const void * vb) -{ - const tr_torrent * a = * (const tr_torrent **) va; - const tr_torrent * b = * (const tr_torrent **) vb; +static int +compareTorrentByQueuePosition (const void * va, const void * vb) +{ + const tr_torrent * a = * (const tr_torrent **) va; + const tr_torrent * b = * (const tr_torrent **) vb; - return a->queuePosition - b->queuePosition; -} + return a->queuePosition - b->queuePosition; +} static const char* torrentStart (tr_session * session, @@ -273,7 +273,7 @@ torrentStart (tr_session * session, assert (idle_data == NULL); torrents = getTorrents (session, args_in, &torrentCount); - qsort (torrents, torrentCount, sizeof (tr_torrent *), compareTorrentByQueuePosition); + qsort (torrents, torrentCount, sizeof (tr_torrent *), compareTorrentByQueuePosition); for (i=0; isession; - assert (tr_isSession (session)); - tr_sessionLock (session); + if (tr_isTorrent (tor)) + { + tr_session * session = tor->session; + assert (tr_isSession (session)); + tr_sessionLock (session); - tr_torrentClearCompletenessCallback (tor); - tr_runInEventThread (session, closeTorrent, tor); + tr_torrentClearCompletenessCallback (tor); + tr_runInEventThread (session, closeTorrent, tor); - tr_sessionUnlock (session); - } + tr_sessionUnlock (session); + } } struct remove_data @@ -1958,7 +1958,7 @@ removeTorrent (void * vdata) { struct remove_data * data = vdata; tr_session * session = data->tor->session; - tr_sessionLock (session); + tr_sessionLock (session); if (data->deleteFlag) tr_torrentDeleteLocalData (data->tor, data->deleteFunc); @@ -1967,7 +1967,7 @@ removeTorrent (void * vdata) closeTorrent (data->tor); tr_free (data); - tr_sessionUnlock (session); + tr_sessionUnlock (session); } void @@ -3700,13 +3700,13 @@ renameTorrentFileString (tr_torrent * tor, tr_free (tmp); } - + if (!strcmp (file->name, name)) { tr_free (name); } else - { + { tr_free (file->name); file->name = name; file->is_renamed = true; diff --git a/libtransmission/torrent.h b/libtransmission/torrent.h index a02341734..60a4c0839 100644 --- a/libtransmission/torrent.h +++ b/libtransmission/torrent.h @@ -303,10 +303,10 @@ tr_torBlockCountBytes (const tr_torrent * tor, const tr_block_index_t block) : tor->blockSize; } -static inline void tr_torrentLock (const tr_torrent * tor) -{ - tr_sessionLock (tor->session); -} +static inline void tr_torrentLock (const tr_torrent * tor) +{ + tr_sessionLock (tor->session); +} static inline bool tr_torrentIsLocked (const tr_torrent * tor) { return tr_sessionIsLocked (tor->session); diff --git a/libtransmission/tr-lpd.c b/libtransmission/tr-lpd.c index 4a484c982..4e403e483 100644 --- a/libtransmission/tr-lpd.c +++ b/libtransmission/tr-lpd.c @@ -32,7 +32,7 @@ THE SOFTWARE. #ifdef _WIN32 #include #include - typedef uint16_t in_port_t; /* all missing */ + typedef uint16_t in_port_t; /* all missing */ #else #include #include /* close () */ diff --git a/libtransmission/trevent.c b/libtransmission/trevent.c index 93a03d21b..2cda64eea 100644 --- a/libtransmission/trevent.c +++ b/libtransmission/trevent.c @@ -109,10 +109,10 @@ piperead (int s, char *buf, int len) case WSAEWOULDBLOCK: errno = EAGAIN; break; - case WSAECONNRESET: - /* EOF on the pipe! (win32 socket based implementation) */ - ret = 0; - /* fall through */ + case WSAECONNRESET: + /* EOF on the pipe! (win32 socket based implementation) */ + ret = 0; + /* fall through */ default: errno = werror; break; diff --git a/libtransmission/upnp.c b/libtransmission/upnp.c index f45fc427c..35b0d153f 100644 --- a/libtransmission/upnp.c +++ b/libtransmission/upnp.c @@ -116,14 +116,14 @@ tr_upnpGetSpecificPortMappingEntry (tr_upnp * handle, const char * proto) #if (MINIUPNPC_API_VERSION >= 10) /* adds remoteHost arg */ - err = UPNP_GetSpecificPortMappingEntry (handle->urls.controlURL, - handle->data.first.servicetype, + err = UPNP_GetSpecificPortMappingEntry (handle->urls.controlURL, + handle->data.first.servicetype, portStr, proto, - NULL /*remoteHost*/, + NULL /*remoteHost*/, intClient, intPort, - NULL /*desc*/, + NULL /*desc*/, NULL /*enabled*/, NULL /*duration*/); diff --git a/libtransmission/variant-json.c b/libtransmission/variant-json.c index c4db6e680..1eb5bc250 100644 --- a/libtransmission/variant-json.c +++ b/libtransmission/variant-json.c @@ -216,14 +216,14 @@ extract_escaped_string (const char * in, UTF8 str8_buf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; UTF8 * str8_walk = str8_buf; UTF8 * str8_end = str8_buf + 8; - + if (ConvertUTF32toUTF8 (&str32_walk, str32_end, &str8_walk, str8_end, 0) == 0) { const size_t len = str8_walk - str8_buf; evbuffer_add (buf, str8_buf, len); unescaped = true; } - + in += 6; break; } diff --git a/libtransmission/variant.c b/libtransmission/variant.c index 4b0dae8f1..e0f6ca553 100644 --- a/libtransmission/variant.c +++ b/libtransmission/variant.c @@ -22,7 +22,7 @@ #define __LIBTRANSMISSION_VARIANT_MODULE___ #include "transmission.h" -#include "ConvertUTF.h" +#include "ConvertUTF.h" #include "error.h" #include "file.h" #include "log.h" diff --git a/libtransmission/variant.h b/libtransmission/variant.h index 0b2eb0ce5..4a4dbb13a 100644 --- a/libtransmission/variant.h +++ b/libtransmission/variant.h @@ -49,7 +49,7 @@ struct tr_variant_string size_t len; union { char buf[16]; const char * str; } str; }; - + /* these are PRIVATE IMPLEMENTATION details that should not be touched. * I'll probably change them just to break your code! HA HA HA! @@ -200,7 +200,7 @@ tr_variantIsString (const tr_variant * b) bool tr_variantGetStr (const tr_variant * variant, const char ** setme_str, size_t * setme_len); - + void tr_variantInitStr (tr_variant * initme, const void * str, int str_len); diff --git a/libtransmission/web.c b/libtransmission/web.c index 79b56a793..4d12dec19 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -275,7 +275,7 @@ tr_webRunImpl (tr_session * session, while (session->web == NULL) tr_wait_msec (20); } - + task = tr_new0 (struct tr_web_task, 1); task->session = session; task->torrentId = torrentId; diff --git a/libtransmission/webseed.c b/libtransmission/webseed.c index 7339f8958..338424b43 100644 --- a/libtransmission/webseed.c +++ b/libtransmission/webseed.c @@ -285,7 +285,7 @@ on_content_changed (struct evbuffer * buf, that will be needed when writing the block in a different thread */ evbuffer_remove_buffer (task->content, data->content, block_size * completed); - + tr_runInEventThread (w->session, write_block_func, data); task->blocks_done += completed; } diff --git a/qt/README.txt b/qt/README.txt index fee494942..4b6800d9a 100644 --- a/qt/README.txt +++ b/qt/README.txt @@ -2,7 +2,7 @@ VOLUNTEERS WANTED - Qt developers and translators are needed - If you find a bug, please report it at http://trac.transmissionbt.com/ - + ABOUT TRANSMISSION-QT Transmission-qt is a GUI for Transmission loosely based on the GTK+ client. @@ -42,4 +42,4 @@ BUILDING ON UNIX 4. In the qt/ directory, type "make" 5. In the qt/ directory, as root, type "INSTALL_ROOT=/usr make install" (Feel free to replace /usr with /usr/local or /opt or whatever) - + diff --git a/qt/app.cc b/qt/app.cc index 6a88b5089..bfc8a778c 100644 --- a/qt/app.cc +++ b/qt/app.cc @@ -353,7 +353,7 @@ MyApp::onTorrentsAdded (const QSet& torrents) onNewTorrentChanged (id); if (!tor->isSeed ()) - connect (tor, SIGNAL (torrentCompleted (int)), this, SLOT (onTorrentCompleted (int))); + connect (tor, SIGNAL (torrentCompleted (int)), this, SLOT (onTorrentCompleted (int))); } } } diff --git a/qt/config.pri.in b/qt/config.pri.in index df77095cb..25ba50e2b 100644 --- a/qt/config.pri.in +++ b/qt/config.pri.in @@ -1,5 +1,5 @@ DHT_LIBS = @DHT_LIBS_QT@ LIBB64_LIBS = @LIBB64_LIBS_QT@ -LIBUTP_LIBS = @LIBUTP_LIBS_QT@ +LIBUTP_LIBS = @LIBUTP_LIBS_QT@ LIBUPNP_LIBS = @LIBUPNP_LIBS_QT@ LIBNATPMP_LIBS = @LIBNATPMP_LIBS_QT@ diff --git a/qt/file-tree.cc b/qt/file-tree.cc index b739c0de4..d4b3fee86 100644 --- a/qt/file-tree.cc +++ b/qt/file-tree.cc @@ -195,7 +195,7 @@ FileTreeItem::progress () const QString FileTreeItem::sizeString () const { - QString str; + QString str; if (myChildren.isEmpty()) { @@ -437,7 +437,7 @@ FileTreeModel::setEditable (bool editable) FileTreeItem * FileTreeModel::itemFromIndex (const QModelIndex& index) const { - return static_cast(index.internalPointer()); + return static_cast(index.internalPointer()); } QVariant @@ -504,7 +504,7 @@ FileTreeModel::headerData (int column, Qt::Orientation orientation, int role) co break; case COL_PRIORITY: - data.setValue (tr("Priority")); + data.setValue (tr("Priority")); break; default: @@ -634,7 +634,7 @@ FileTreeModel::addFile (int fileIndex, item = findItemForFileIndex (fileIndex); - if (item) // this file is already in the tree, we've added this + if (item) // this file is already in the tree, we've added this { QModelIndex indexWithChangedParents; while (!tokens.isEmpty()) diff --git a/qt/prefs-dialog.cc b/qt/prefs-dialog.cc index a81cd42f6..c054eff5b 100644 --- a/qt/prefs-dialog.cc +++ b/qt/prefs-dialog.cc @@ -614,7 +614,7 @@ PrefsDialog::createDownloadingTab () hig->addSectionDivider (); hig->addSectionTitle (tr ("Download Queue")); - + hig->addRow (tr ("Ma&ximum active downloads:"), spinBoxNew (Prefs::DOWNLOAD_QUEUE_SIZE, 1, INT_MAX, 1)); hig->addRow (tr ("Downloads sharing data in the last &N minutes are active:"), spinBoxNew (Prefs::QUEUE_STALLED_MINUTES, 1, INT_MAX, 10)); diff --git a/qt/qtr.pro b/qt/qtr.pro index 43678f118..fe3bd3ac9 100644 --- a/qt/qtr.pro +++ b/qt/qtr.pro @@ -21,7 +21,7 @@ greaterThan(QT_MAJOR_VERSION, 4) { TRANSMISSION_TOP = .. -include(config.pri) +include(config.pri) INCLUDEPATH = $${EVENT_TOP}/include $${INCLUDEPATH} INCLUDEPATH += $${TRANSMISSION_TOP} diff --git a/qt/session.cc b/qt/session.cc index dc7218dba..c2d9d44e0 100644 --- a/qt/session.cc +++ b/qt/session.cc @@ -534,12 +534,12 @@ Session::sendTorrentRequest (const char * request, const QSet& ids) } void Session::pauseTorrents (const QSet& ids) { sendTorrentRequest ("torrent-stop", ids); } -void Session::startTorrents (const QSet& ids) { sendTorrentRequest ("torrent-start", ids); } +void Session::startTorrents (const QSet& ids) { sendTorrentRequest ("torrent-start", ids); } void Session::startTorrentsNow (const QSet& ids) { sendTorrentRequest ("torrent-start-now", ids); } -void Session::queueMoveTop (const QSet& ids) { sendTorrentRequest ("queue-move-top", ids); } -void Session::queueMoveUp (const QSet& ids) { sendTorrentRequest ("queue-move-up", ids); } -void Session::queueMoveDown (const QSet& ids) { sendTorrentRequest ("queue-move-down", ids); } -void Session::queueMoveBottom (const QSet& ids) { sendTorrentRequest ("queue-move-bottom", ids); } +void Session::queueMoveTop (const QSet& ids) { sendTorrentRequest ("queue-move-top", ids); } +void Session::queueMoveUp (const QSet& ids) { sendTorrentRequest ("queue-move-up", ids); } +void Session::queueMoveDown (const QSet& ids) { sendTorrentRequest ("queue-move-down", ids); } +void Session::queueMoveBottom (const QSet& ids) { sendTorrentRequest ("queue-move-bottom", ids); } void Session::refreshActiveTorrents () diff --git a/qt/torrent-filter.cc b/qt/torrent-filter.cc index 6744252c3..0fac3752f 100644 --- a/qt/torrent-filter.cc +++ b/qt/torrent-filter.cc @@ -251,7 +251,7 @@ TorrentFilter::countTorrentsPerMode (int * setmeCounts) const std::fill_n (setmeCounts, static_cast(FilterMode::NUM_MODES), 0); for (int row(0); ; ++row) - { + { QModelIndex index (sourceModel()->index(row, 0)); if (!index.isValid()) break; diff --git a/qt/utils.cc b/qt/utils.cc index b4f663def..7aa1affa8 100644 --- a/qt/utils.cc +++ b/qt/utils.cc @@ -219,7 +219,7 @@ Utils::isValidUtf8 (const char * s) for (int m = 1; m < n; m++) if ((c[m] & 0xc0) != 0x80) return false; - } + } return true; } diff --git a/utils/create.c b/utils/create.c index d82d37f5a..c76c7a374 100644 --- a/utils/create.c +++ b/utils/create.c @@ -86,12 +86,12 @@ parseCommandLine (int argc, const char ** argv) break; case 's': - if (optarg) - { + if (optarg) + { char * endptr = NULL; piecesize_kib = strtoul (optarg, &endptr, 10); if (endptr && *endptr=='M') - piecesize_kib *= KiB; + piecesize_kib *= KiB; } break;