Changeset View
Changeset View
Standalone View
Standalone View
src/drkonqi.cpp
Show First 20 Lines • Show All 325 Lines • ▼ Show 20 Line(s) | |||||
326 | 326 | | |||
327 | int DrKonqi::thread() | 327 | int DrKonqi::thread() | ||
328 | { | 328 | { | ||
329 | return instance()->m_thread; | 329 | return instance()->m_thread; | ||
330 | } | 330 | } | ||
331 | 331 | | |||
332 | bool DrKonqi::ignoreQuality() | 332 | bool DrKonqi::ignoreQuality() | ||
333 | { | 333 | { | ||
334 | return qEnvironmentVariableIsSet("DRKONQI_IGNORE_QUALITY"); | 334 | static bool ignore = qEnvironmentVariableIsSet("DRKONQI_IGNORE_QUALITY") || | ||
335 | qEnvironmentVariableIsSet("DRKONQI_TEST_MODE"); | ||||
336 | return ignore; | ||||
335 | } | 337 | } | ||
336 | 338 | | |||
337 | const QString &DrKonqi::kdeBugzillaURL() | 339 | const QString &DrKonqi::kdeBugzillaURL() | ||
338 | { | 340 | { | ||
339 | // NB: for practical reasons this cannot use the shared instance. Initing the instances requires | 341 | // NB: for practical reasons this cannot use the shared instance. Initing the instances requires | ||
340 | // knowing the URL already, so we'd have an init loop. Use a local static instead. | 342 | // knowing the URL already, so we'd have an init loop. Use a local static instead. | ||
341 | static QString url; | 343 | static QString url; | ||
342 | if (!url.isEmpty()) { | 344 | if (!url.isEmpty()) { | ||
343 | return url; | 345 | return url; | ||
344 | } | 346 | } | ||
345 | 347 | | |||
346 | url = QString::fromLocal8Bit(qgetenv("DRKONQI_KDE_BUGZILLA_URL")); | 348 | url = QString::fromLocal8Bit(qgetenv("DRKONQI_KDE_BUGZILLA_URL")); | ||
347 | if (!url.isEmpty()) { | 349 | if (!url.isEmpty()) { | ||
348 | return url; | 350 | return url; | ||
349 | } | 351 | } | ||
350 | 352 | | |||
351 | url = QStringLiteral("https://bugs.kde.org/"); | 353 | if (qEnvironmentVariableIsSet("DRKONQI_TEST_MODE")) { | ||
352 | return url; | 354 | return QStringLiteral("https://bugstest.kde.org/"); | ||
355 | } | ||||
356 | | ||||
357 | return QStringLiteral("https://bugs.kde.org/"); | ||||
353 | } | 358 | } |