Merge pull request #4225 from sobkas/master
This time it fixes the crash, I swear.
This commit is contained in:
commit
d2b62334e8
@ -84,16 +84,15 @@ void AddPodcastByUrl::RequestFinished(PodcastUrlLoaderReply* reply) {
|
|||||||
|
|
||||||
void AddPodcastByUrl::Show() {
|
void AddPodcastByUrl::Show() {
|
||||||
ui_->url->setFocus();
|
ui_->url->setFocus();
|
||||||
if (!ui_->url->text().isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QClipboard* clipboard = QApplication::clipboard();
|
const QClipboard* clipboard = QApplication::clipboard();
|
||||||
for (const QString& contents : QStringList()
|
QStringList contents;
|
||||||
<< clipboard->text(QClipboard::Clipboard)
|
contents << clipboard->text(QClipboard::Selection)
|
||||||
<< clipboard->text(QClipboard::Selection)) {
|
<< clipboard->text(QClipboard::Clipboard);
|
||||||
if (contents.contains("://")) {
|
|
||||||
ui_->url->setText(contents);
|
for (const QString& content : contents) {
|
||||||
|
if (content.contains("://")) {
|
||||||
|
ui_->url->setText(content);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -468,9 +468,7 @@ void PodcastService::ReloadSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PodcastService::EnsureAddPodcastDialogCreated() {
|
void PodcastService::EnsureAddPodcastDialogCreated() {
|
||||||
if (!add_podcast_dialog_) {
|
|
||||||
add_podcast_dialog_.reset(new AddPodcastDialog(app_));
|
add_podcast_dialog_.reset(new AddPodcastDialog(app_));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PodcastService::AddPodcast() {
|
void PodcastService::AddPodcast() {
|
||||||
|
@ -145,7 +145,7 @@ class PodcastService : public InternetService {
|
|||||||
QMap<int, QStandardItem*> podcasts_by_database_id_;
|
QMap<int, QStandardItem*> podcasts_by_database_id_;
|
||||||
QMap<int, QStandardItem*> episodes_by_database_id_;
|
QMap<int, QStandardItem*> episodes_by_database_id_;
|
||||||
|
|
||||||
QScopedPointer<AddPodcastDialog> add_podcast_dialog_;
|
std::unique_ptr<AddPodcastDialog> add_podcast_dialog_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PODCASTS_PODCASTSERVICE_H_
|
#endif // PODCASTS_PODCASTSERVICE_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user