mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
incremental, commiting in order to push
This commit is contained in:
parent
08ab94bf5a
commit
5b6ccf67fd
|
@ -93,14 +93,17 @@ SettingsForm::~SettingsForm()
|
|||
{
|
||||
}
|
||||
|
||||
void SettingsForm::populateProfiles()
|
||||
QList<QString> SettingsForm::searchProfiles()
|
||||
{
|
||||
QList<QString> out;
|
||||
QDir dir(Settings::getSettingsDirPath());
|
||||
dir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
|
||||
dir.setNameFilters(QStringList("*.tox"));
|
||||
for(QFileInfo file : dir.entryInfoList()) {
|
||||
profiles.addItem(file.completeBaseName());
|
||||
for(QFileInfo file : dir.entryInfoList())
|
||||
{
|
||||
out += file.completeBaseName();
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
QString SettingsForm::getSelectedSavePath()
|
||||
|
@ -115,7 +118,11 @@ void SettingsForm::setFriendAddress(const QString& friendAddress)
|
|||
|
||||
void SettingsForm::show(Ui::Widget &ui)
|
||||
{
|
||||
populateProfiles();
|
||||
profiles.clear();
|
||||
for (QString profile : searchProfiles())
|
||||
{
|
||||
profiles.addItem(profile);
|
||||
}
|
||||
ui.mainContent->layout()->addWidget(main);
|
||||
ui.mainHead->layout()->addWidget(head);
|
||||
main->show();
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
~SettingsForm();
|
||||
|
||||
void show(Ui::Widget& ui);
|
||||
static QList<QString> searchProfiles();
|
||||
|
||||
public slots:
|
||||
void setFriendAddress(const QString& friendAddress);
|
||||
|
@ -70,7 +71,6 @@ private:
|
|||
QCheckBox enableIPv6, useTranslations, makeToxPortable;
|
||||
QVBoxLayout layout, headLayout;
|
||||
QWidget *main, *head, *hboxcont1, *hboxcont2;
|
||||
void populateProfiles();
|
||||
QString getSelectedSavePath();
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue
Block a user