mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-04 10:54:35 +00:00
parent
0ad831e48a
commit
297ef52dcb
@ -71,6 +71,21 @@
|
|||||||
#include "ui_optionsdialog.h"
|
#include "ui_optionsdialog.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
QStringList translatedWeekdayNames()
|
||||||
|
{
|
||||||
|
// return translated strings from Monday to Sunday in user selected locale
|
||||||
|
|
||||||
|
const QLocale locale {Preferences::instance()->getLocale()};
|
||||||
|
const QDate date {2018, 11, 5}; // Monday
|
||||||
|
QStringList ret;
|
||||||
|
for (int i = 0; i < 7; ++i)
|
||||||
|
ret.append(locale.toString(date.addDays(i), "dddd"));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class WheelEventEater : public QObject
|
class WheelEventEater : public QObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -164,8 +179,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||||||
initializeLanguageCombo();
|
initializeLanguageCombo();
|
||||||
|
|
||||||
// Load week days (scheduler)
|
// Load week days (scheduler)
|
||||||
for (uint i = 1; i <= 7; ++i)
|
m_ui->comboBoxScheduleDays->addItems(translatedWeekdayNames());
|
||||||
m_ui->comboBoxScheduleDays->addItem(QDate::longDayName(i, QDate::StandaloneFormat));
|
|
||||||
|
|
||||||
// Load options
|
// Load options
|
||||||
loadOptions();
|
loadOptions();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user