mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
Fix functions and macros using to support both Qt4 and Qt5.
This commit is contained in:
parent
763d8a392f
commit
ce3aac5f9d
51 changed files with 260 additions and 181 deletions
|
@ -14,10 +14,10 @@
|
|||
|
||||
enum AdvSettingsCols {PROPERTY, VALUE};
|
||||
enum AdvSettingsRows {DISK_CACHE, DISK_CACHE_TTL, OUTGOING_PORT_MIN, OUTGOING_PORT_MAX, IGNORE_LIMIT_LAN, RECHECK_COMPLETED, LIST_REFRESH, RESOLVE_COUNTRIES, RESOLVE_HOSTS, MAX_HALF_OPEN, SUPER_SEEDING, NETWORK_IFACE, NETWORK_ADDRESS, PROGRAM_NOTIFICATIONS, TRACKER_STATUS, TRACKER_PORT,
|
||||
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
UPDATE_CHECK,
|
||||
#endif
|
||||
#if defined(Q_WS_X11)
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||
USE_ICON_THEME,
|
||||
#endif
|
||||
CONFIRM_DELETE_TORRENT, TRACKER_EXCHANGE,
|
||||
|
@ -34,10 +34,10 @@ private:
|
|||
cb_enable_tracker_ext;
|
||||
QComboBox combo_iface;
|
||||
QSpinBox spin_cache_ttl;
|
||||
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
QCheckBox cb_update_check;
|
||||
#endif
|
||||
#if defined(Q_WS_X11)
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||
QCheckBox cb_use_icon_theme;
|
||||
#endif
|
||||
QCheckBox cb_announce_all_trackers;
|
||||
|
@ -107,11 +107,11 @@ public slots:
|
|||
// Tracker
|
||||
pref.setTrackerEnabled(cb_tracker_status.isChecked());
|
||||
pref.setTrackerPort(spin_tracker_port.value());
|
||||
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
pref.setUpdateCheckEnabled(cb_update_check.isChecked());
|
||||
#endif
|
||||
// Icon theme
|
||||
#if defined(Q_WS_X11)
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||
pref.useSystemIconTheme(cb_use_icon_theme.isChecked());
|
||||
#endif
|
||||
pref.setConfirmTorrentDeletion(cb_confirm_torrent_deletion.isChecked());
|
||||
|
@ -250,11 +250,11 @@ private slots:
|
|||
spin_tracker_port.setMaximum(65535);
|
||||
spin_tracker_port.setValue(pref.getTrackerPort());
|
||||
setRow(TRACKER_PORT, tr("Embedded tracker port"), &spin_tracker_port);
|
||||
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
cb_update_check.setChecked(pref.isUpdateCheckEnabled());
|
||||
setRow(UPDATE_CHECK, tr("Check for software updates"), &cb_update_check);
|
||||
#endif
|
||||
#if defined(Q_WS_X11)
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||
cb_use_icon_theme.setChecked(pref.useSystemIconTheme());
|
||||
setRow(USE_ICON_THEME, tr("Use system icon theme"), &cb_use_icon_theme);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue