QTfrontend/ui/widget/about.cpp
changeset 12268 2eedf9e0cd6d
parent 12220 a7c08e4748ff
child 12315 0f98d45204d7
equal deleted inserted replaced
12267:dad24eb53873 12268:2eedf9e0cd6d
    78         //: %1 is replaced by the URL of Hedgewars.
    78         //: %1 is replaced by the URL of Hedgewars.
    79         "<p>" + QString(tr("Visit our homepage: %1"))
    79         "<p>" + QString(tr("Visit our homepage: %1"))
    80         .arg("<a href=\"https://www.hedgewars.org/\">https://www.hedgewars.org/</a>") + "</p>" +
    80         .arg("<a href=\"https://www.hedgewars.org/\">https://www.hedgewars.org/</a>") + "</p>" +
    81         //: %1 is the name of a license
    81         //: %1 is the name of a license
    82         tr("This program is distributed under the %1.")
    82         tr("This program is distributed under the %1.")
    83 	.arg("<a href=\"http://www.gnu.org/licenses/gpl-2.0.html\">"+
    83 	.arg("<a href=\"https://www.gnu.org/licenses/gpl-2.0.html\">"+
    84         //: Short for “GNU General Public License version 2”
    84         //: Short for “GNU General Public License version 2”
    85         tr("GNU GPL v2")+"</a>") +
    85         tr("GNU GPL v2")+"</a>") +
    86         "</div>"
    86         "</div>"
    87     );
    87     );
    88     lbl1->setWordWrap(true);
    88     lbl1->setWordWrap(true);
    98 
    98 
    99     //: For the version numbers of Hedgewars' software dependencies
    99     //: For the version numbers of Hedgewars' software dependencies
   100     QString libinfo = QString(tr("Dependency versions:") + QString("<br>"));
   100     QString libinfo = QString(tr("Dependency versions:") + QString("<br>"));
   101 
   101 
   102 #ifdef __GNUC__
   102 #ifdef __GNUC__
   103     libinfo.append(QString(tr("<a href=\"http://gcc.gnu.org\">GCC</a>: %1")).arg(__VERSION__));
   103     libinfo.append(QString(tr("<a href=\"https://gcc.gnu.org\">GCC</a>: %1")).arg(__VERSION__));
   104     libinfo.append(QString("<br>"));
   104     libinfo.append(QString("<br>"));
   105 #else
   105 #else
   106     libinfo.append(QString(tr("Unknown Compiler")).arg(__VERSION__) + QString("<br>"));
   106     libinfo.append(QString(tr("Unknown Compiler")).arg(__VERSION__) + QString("<br>"));
   107 #endif
   107 #endif
   108 
   108 
   109     const SDL_version *sdl_ver;
   109     const SDL_version *sdl_ver;
   110     SDL_version sdl_version;
   110     SDL_version sdl_version;
   111     SDL_GetVersion(&sdl_version);
   111     SDL_GetVersion(&sdl_version);
   112     sdl_ver = &sdl_version;
   112     sdl_ver = &sdl_version;
   113     libinfo.append(QString(tr("<a href=\"http://www.libsdl.org/\">SDL2</a>: %1.%2.%3"))
   113     libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL2</a>: %1.%2.%3"))
   114         .arg(sdl_ver->major)
   114         .arg(sdl_ver->major)
   115         .arg(sdl_ver->minor)
   115         .arg(sdl_ver->minor)
   116         .arg(sdl_ver->patch));
   116         .arg(sdl_ver->patch));
   117     libinfo.append(QString("<br>"));
   117     libinfo.append(QString("<br>"));
   118 
   118 
   119     const SDL_version *sdlmixer_ver = Mix_Linked_Version();
   119     const SDL_version *sdlmixer_ver = Mix_Linked_Version();
   120     libinfo.append(QString(tr("<a href=\"http://www.libsdl.org/\">SDL2_mixer</a>: %1.%2.%3"))
   120     libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL2_mixer</a>: %1.%2.%3"))
   121         .arg(sdlmixer_ver->major)
   121         .arg(sdlmixer_ver->major)
   122         .arg(sdlmixer_ver->minor)
   122         .arg(sdlmixer_ver->minor)
   123         .arg(sdlmixer_ver->patch));
   123         .arg(sdlmixer_ver->patch));
   124     libinfo.append(QString("<br>"));
   124     libinfo.append(QString("<br>"));
   125 
   125 
   129     if (sdlnet_handle != NULL) {
   129     if (sdlnet_handle != NULL) {
   130         SDL_version *(*sdlnet_ver_get)(void) = NULL;
   130         SDL_version *(*sdlnet_ver_get)(void) = NULL;
   131         sdlnet_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlnet_handle, "SDLNet_Linked_Version");
   131         sdlnet_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlnet_handle, "SDLNet_Linked_Version");
   132         if (sdlnet_ver_get != NULL) {
   132         if (sdlnet_ver_get != NULL) {
   133             SDL_version *sdlnet_ver = sdlnet_ver_get();
   133             SDL_version *sdlnet_ver = sdlnet_ver_get();
   134             libinfo.append(QString(tr("<a href=\"http://www.libsdl.org/\">SDL_net</a>: %1.%2.%3"))
   134             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL_net</a>: %1.%2.%3"))
   135                 .arg(sdlnet_ver->major)
   135                 .arg(sdlnet_ver->major)
   136                 .arg(sdlnet_ver->minor)
   136                 .arg(sdlnet_ver->minor)
   137                 .arg(sdlnet_ver->patch));
   137                 .arg(sdlnet_ver->patch));
   138             libinfo.append(QString("<br>"));
   138             libinfo.append(QString("<br>"));
   139         }
   139         }
   144     if (sdlimage_handle != NULL) {
   144     if (sdlimage_handle != NULL) {
   145         SDL_version *(*sdlimage_ver_get)(void) = NULL;
   145         SDL_version *(*sdlimage_ver_get)(void) = NULL;
   146         sdlimage_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlimage_handle, "IMG_Linked_Version");
   146         sdlimage_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlimage_handle, "IMG_Linked_Version");
   147         if (sdlimage_ver_get != NULL) {
   147         if (sdlimage_ver_get != NULL) {
   148             SDL_version *sdlimage_ver = sdlimage_ver_get();
   148             SDL_version *sdlimage_ver = sdlimage_ver_get();
   149             libinfo.append(QString(tr("<a href=\"http://www.libsdl.org/\">SDL_image</a>: %1.%2.%3"))
   149             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL_image</a>: %1.%2.%3"))
   150                 .arg(sdlimage_ver->major)
   150                 .arg(sdlimage_ver->major)
   151                 .arg(sdlimage_ver->minor)
   151                 .arg(sdlimage_ver->minor)
   152                 .arg(sdlimage_ver->patch));
   152                 .arg(sdlimage_ver->patch));
   153             libinfo.append(QString("<br>"));
   153             libinfo.append(QString("<br>"));
   154         }
   154         }
   159     if (sdlttf_handle != NULL) {
   159     if (sdlttf_handle != NULL) {
   160         SDL_version *(*sdlttf_ver_get)(void) = NULL;
   160         SDL_version *(*sdlttf_ver_get)(void) = NULL;
   161         sdlttf_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlttf_handle, "TTF_Linked_Version");
   161         sdlttf_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlttf_handle, "TTF_Linked_Version");
   162         if (sdlttf_ver_get != NULL) {
   162         if (sdlttf_ver_get != NULL) {
   163             SDL_version *sdlttf_ver = sdlttf_ver_get();
   163             SDL_version *sdlttf_ver = sdlttf_ver_get();
   164             libinfo.append(QString(tr("<a href=\"http://www.libsdl.org/\">SDL_ttf</a>: %1.%2.%3"))
   164             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL_ttf</a>: %1.%2.%3"))
   165                 .arg(sdlttf_ver->major)
   165                 .arg(sdlttf_ver->major)
   166                 .arg(sdlttf_ver->minor)
   166                 .arg(sdlttf_ver->minor)
   167                 .arg(sdlttf_ver->patch));
   167                 .arg(sdlttf_ver->patch));
   168             libinfo.append(QString("<br>"));
   168             libinfo.append(QString("<br>"));
   169         }
   169         }
   170         SDL_UnloadObject(sdlnet_handle);
   170         SDL_UnloadObject(sdlnet_handle);
   171     }
   171     }
   172 
   172 
   173 
   173 
   174     libinfo.append(QString(tr("<a href=\"http://qt-project.org/\">Qt</a>: %1")).arg(QT_VERSION_STR));
   174     libinfo.append(QString(tr("<a href=\"https://www.qt.io/developers/\">Qt</a>: %1")).arg(QT_VERSION_STR));
   175     libinfo.append(QString("<br>"));
   175     libinfo.append(QString("<br>"));
   176 
   176 
   177 #ifdef VIDEOREC
   177 #ifdef VIDEOREC
   178     libinfo.append(QString(tr("<a href=\"http://libav.org\">libavcodec</a>: %1.%2.%3"))
   178     libinfo.append(QString(tr("<a href=\"https://libav.org\">libavcodec</a>: %1.%2.%3"))
   179         .arg(LIBAVCODEC_VERSION_MAJOR)
   179         .arg(LIBAVCODEC_VERSION_MAJOR)
   180         .arg(LIBAVCODEC_VERSION_MINOR)
   180         .arg(LIBAVCODEC_VERSION_MINOR)
   181         .arg(LIBAVCODEC_VERSION_MICRO));
   181         .arg(LIBAVCODEC_VERSION_MICRO));
   182     libinfo.append(QString("<br>"));
   182     libinfo.append(QString("<br>"));
   183     libinfo.append(QString(tr("<a href=\"http://libav.org\">libavformat</a>: %1.%2.%3"))
   183     libinfo.append(QString(tr("<a href=\"https://libav.org\">libavformat</a>: %1.%2.%3"))
   184         .arg(LIBAVFORMAT_VERSION_MAJOR)
   184         .arg(LIBAVFORMAT_VERSION_MAJOR)
   185         .arg(LIBAVFORMAT_VERSION_MINOR)
   185         .arg(LIBAVFORMAT_VERSION_MINOR)
   186         .arg(LIBAVFORMAT_VERSION_MICRO));
   186         .arg(LIBAVFORMAT_VERSION_MICRO));
   187     libinfo.append(QString("<br>"));
   187     libinfo.append(QString("<br>"));
   188     libinfo.append(QString(tr("<a href=\"http://libav.org\">libavutil</a>: %1.%2.%3"))
   188     libinfo.append(QString(tr("<a href=\"https://libav.org\">libavutil</a>: %1.%2.%3"))
   189         .arg(LIBAVUTIL_VERSION_MAJOR)
   189         .arg(LIBAVUTIL_VERSION_MAJOR)
   190         .arg(LIBAVUTIL_VERSION_MINOR)
   190         .arg(LIBAVUTIL_VERSION_MINOR)
   191         .arg(LIBAVUTIL_VERSION_MICRO));
   191         .arg(LIBAVUTIL_VERSION_MICRO));
   192     libinfo.append(QString("<br>"));
   192     libinfo.append(QString("<br>"));
   193 #endif
   193 #endif
   194 
   194 
   195     libinfo.append(QString(tr("<a href=\"http://icculus.org/physfs/\">PhysFS</a>: %1.%2.%3"))
   195     libinfo.append(QString(tr("<a href=\"https://icculus.org/physfs/\">PhysFS</a>: %1.%2.%3"))
   196         .arg(PHYSFS_VER_MAJOR)
   196         .arg(PHYSFS_VER_MAJOR)
   197         .arg(PHYSFS_VER_MINOR)
   197         .arg(PHYSFS_VER_MINOR)
   198         .arg(PHYSFS_VER_PATCH));
   198         .arg(PHYSFS_VER_PATCH));
   199     libinfo.append(QString("<br>"));
   199     libinfo.append(QString("<br>"));
   200 
   200