1 | /******************************************************************* |
2 | * applicationdetailsexamples.cpp |
3 | * Copyright 2010 Dario Andres Rodriguez <andresbajotierra@gmail.com> |
4 | * |
5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License as |
7 | * published by the Free Software Foundation; either version 2 of |
8 | * the License, or (at your option) any later version. |
9 | * |
10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * |
18 | ******************************************************************/ |
19 | |
20 | #include "applicationdetailsexamples.h" |
21 | |
22 | #include <KLocalizedString> |
23 | |
24 | #include "drkonqi.h" |
25 | #include "crashedapplication.h" |
26 | |
27 | ApplicationDetailsExamples::ApplicationDetailsExamples(QObject * parent) |
28 | : QObject(parent) |
29 | { |
30 | QString binaryName = DrKonqi::crashedApplication()->fakeExecutableBaseName(); |
31 | |
32 | if (binaryName == QLatin1String("plasma-desktop" )) { |
33 | m_examples = i18nc("@info examples about information the user can provide" , |
34 | "Widgets you have in your desktop and panels (both official and unofficial), " |
35 | "desktop settings (wallpaper plugin, themes), activities, and dashboard configuration." ); |
36 | } else if (binaryName == QLatin1String("kwin" )) { |
37 | m_examples = i18nc("@info examples about information the user can provide" , |
38 | "State of Desktop Effects (Compositing), kind of effects enabled, window decoration, " |
39 | "and specific window rules and configuration." ); |
40 | } else if (binaryName == QLatin1String("konqueror" ) || |
41 | binaryName == QLatin1String("rekonq" )) { |
42 | m_examples = i18nc("@info examples about information the user can provide" , |
43 | "sites you were visiting, number of opened tabs, plugins you have installed, " |
44 | "and any other non-default setting." ); |
45 | } else if (binaryName == QLatin1String("dolphin" )) { |
46 | m_examples = i18nc("@info examples about information the user can provide" , |
47 | "File view mode, grouping and sorting settings, preview settings, and directory you were browsing." ); |
48 | } else if (binaryName == QLatin1String("kopete" )) { |
49 | m_examples = i18nc("@info examples about information the user can provide" , |
50 | "Instant Messaging protocols you use, and plugins you have installed (official and unofficial)." ); |
51 | } else if (binaryName == QLatin1String("kmail" )) { |
52 | m_examples = i18nc("@info examples about information the user can provide" , |
53 | "Mail protocols and account-types you use." ); |
54 | } else if (binaryName == QLatin1String("kwrite" ) || |
55 | binaryName == QLatin1String("kate" ) || |
56 | binaryName == QLatin1String("kword" )) { |
57 | m_examples = i18nc("@info examples about information the user can provide" , |
58 | "Type of the document you were editing." ); |
59 | } else if (binaryName == QLatin1String("juk" ) || |
60 | binaryName == QLatin1String("amarok" ) || |
61 | binaryName == QLatin1String("dragon" ) || |
62 | binaryName == QLatin1String("kaffeine" )) { |
63 | m_examples = i18nc("@info examples about information the user can provide" , |
64 | "Type of media (extension and format) you were watching and/or listening to." ); |
65 | } |
66 | } |
67 | |
68 | bool ApplicationDetailsExamples::hasExamples() const |
69 | { |
70 | return !m_examples.isEmpty(); |
71 | } |
72 | |
73 | QString ApplicationDetailsExamples::examples() const |
74 | { |
75 | return m_examples; |
76 | } |
77 | |