diff options
12 files changed, 52 insertions, 51 deletions
diff --git a/src/plugins/General/lyrics/lyricswindow.cpp b/src/plugins/General/lyrics/lyricswindow.cpp index 9dac146c2..aa19cbfbe 100644 --- a/src/plugins/General/lyrics/lyricswindow.cpp +++ b/src/plugins/General/lyrics/lyricswindow.cpp @@ -64,12 +64,13 @@ void LyricsWindow::showText(QNetworkReply *reply) if (reply->error() != QNetworkReply::NoError) { ui.stateLabel->setText(tr("Error")); - ui.textEdit->setText(reply->errorString()); + ui.textBrowser->setText(reply->errorString()); return; } QString content = QString::fromUtf8(reply->readAll().constData()); - QRegExp artist_regexp("<div id=\\\"artist\\\">([^<]*)</div>"); + QRegExp artist_regexp("<div id=\\\"artist\\\">(.*)</div>"); + artist_regexp.setMinimal(true); QRegExp title_regexp("<div id=\\\"title\\\">([^<]*)</div>"); QRegExp lyrics_regexp("<div id=\\\"lyrics\\\">([^<]*)</div>"); artist_regexp.indexIn(content); @@ -81,11 +82,11 @@ void LyricsWindow::showText(QNetworkReply *reply) QString lyrics = lyrics_regexp.cap(1); lyrics.replace("[br /]", "<br />"); if(lyrics.trimmed().isEmpty()) - ui.textEdit->setHtml("<b>" + tr("Not found") + "</b>"); + ui.textBrowser->setHtml("<b>" + tr("Not found") + "</b>"); else { text += lyrics; - ui.textEdit->setHtml(text); + ui.textBrowser->setHtml(text); } reply->deleteLater(); } diff --git a/src/plugins/General/lyrics/lyricswindow.ui b/src/plugins/General/lyrics/lyricswindow.ui index 79cc67b1f..a36030751 100644 --- a/src/plugins/General/lyrics/lyricswindow.ui +++ b/src/plugins/General/lyrics/lyricswindow.ui @@ -54,13 +54,6 @@ </item> </layout> </item> - <item row="1" column="0" colspan="3"> - <widget class="QTextEdit" name="textEdit"> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> <item row="2" column="0"> <widget class="QLabel" name="stateLabel"> <property name="text"> @@ -88,6 +81,13 @@ </property> </widget> </item> + <item row="1" column="0" colspan="3"> + <widget class="QTextBrowser" name="textBrowser"> + <property name="openExternalLinks"> + <bool>true</bool> + </property> + </widget> + </item> </layout> </widget> <resources/> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts index b89d64594..ccc4d322f 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts @@ -55,22 +55,22 @@ <translation>Chyba</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Text: %1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Nespojeno</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation>Nenalezeno</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Příjímám</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts index c00290796..cd4ba6239 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts @@ -55,22 +55,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Liedtext: %1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Keine Verbindung</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation>Es kann kein Liedtext für dieses Stück gefunden werden.</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Daten werden empfangen</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_it.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_it.ts index a422acd15..f43fd4627 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_it.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_it.ts @@ -55,22 +55,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Testo: %1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Nessuna connessione</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation>Non trovato</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Ricezione</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_lt.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_lt.ts index 3904fc4f2..477a096e3 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_lt.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_lt.ts @@ -55,22 +55,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Dainos tekstas: %1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Nėra ryšio</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation>Nerasta</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Gaunu</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts index 3ff34374a..028544017 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts @@ -55,22 +55,22 @@ <translation>Błąd</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation>Nie znaleziono</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Nie połączony</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Pobieranie</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Teksty: %1 - %2</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts index 2e1a9c395..c9ff7dfcb 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts @@ -55,22 +55,22 @@ <translation>Ошибка</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Текст песни: %1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Нет соединения</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation>Не найдено</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Получение</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_tr.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_tr.ts index cb3cd9fd8..87fca0ccc 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_tr.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_tr.ts @@ -55,22 +55,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Bağlantı yok</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Alınıyor</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Şarkı Sözü: %1 - %2</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts index 5509f98c1..7215c6243 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts @@ -55,22 +55,22 @@ <translation>Помилка</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>Тексти: %1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>Немає з'єднання</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation>Не знайдено</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>Отримання</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts index 24d34699d..ee6da7266 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts @@ -55,22 +55,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>歌词:%1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>无连接</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>接受</translation> </message> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts index 03bb14ddc..c28616283 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts @@ -55,22 +55,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="96"/> + <location filename="../lyricswindow.cpp" line="97"/> <source>Lyrics: %1 - %2</source> <translation>歌詞:%1 - %2</translation> </message> <message> - <location filename="../lyricswindow.ui" line="67"/> + <location filename="../lyricswindow.ui" line="60"/> <source>No connection</source> <translation>無連接</translation> </message> <message> - <location filename="../lyricswindow.cpp" line="84"/> + <location filename="../lyricswindow.cpp" line="85"/> <source>Not found</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../lyricswindow.cpp" line="95"/> + <location filename="../lyricswindow.cpp" line="96"/> <source>Receiving</source> <translation>接受</translation> </message> |
