Skip to content

Commit

Permalink
refactor: Clean code[831649]
Browse files Browse the repository at this point in the history
  • Loading branch information
Greedysky committed Feb 13, 2024
1 parent 6477a3e commit c592cad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
13 changes: 5 additions & 8 deletions TTKModule/TTKCore/musicUtilsKits/musicfileutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,6 @@ QString TTK::File::getSaveFileName(QWidget *parent, const QString &filter)
QString path = G_SETTING_PTR->value(MusicSettingManager::LastFileDialogPath).toString();
#if defined Q_OS_WIN || defined Q_OS_MAC
path = QFileDialog::getSaveFileName(parent, title, path, filter);
if(!path.isEmpty())
{
G_SETTING_PTR->setValue(MusicSettingManager::LastFileDialogPath, path);
}
return path;
#else
QFileDialog dialog(parent, title, QFileInfo(path).absolutePath(), filter);
dialog.setAcceptMode(QFileDialog::AcceptSave);
Expand Down Expand Up @@ -244,8 +239,10 @@ QString TTK::File::getSaveFileName(QWidget *parent, const QString &filter)
{
path += "." + suffix;
}

G_SETTING_PTR->setValue(MusicSettingManager::LastFileDialogPath, path);
return path;
#endif
if(!path.isEmpty())
{
G_SETTING_PTR->setValue(MusicSettingManager::LastFileDialogPath, path);
}
return path;
}
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ MusicPlaylistBackupWidget::MusicPlaylistBackupWidget(QWidget *parent)

initialize();

// enable next version
button->hide();

connect(button, SIGNAL(clicked()), SLOT(restoreButtonClicked()));
connect(m_dateBox, SIGNAL(currentTextChanged(QString)), SLOT(currentDateChanged(QString)));
connect(m_timeBox, SIGNAL(currentIndexChanged(int)), SLOT(currentTimeChanged(int)));
Expand Down

0 comments on commit c592cad

Please sign in to comment.