diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5442172f..97550063 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,11 @@ project(KDEBASE_WORKSPACE)
# TODO: Remove when kdelibs >= 4.10 will be required
cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+include(CTest)
+include(CTestConfig.cmake)
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+
# Used e.g. in KDE4WorkspaceConfig.cmake, Alex
set(KDE4WORKSPACE_VERSION_MAJOR 4)
set(KDE4WORKSPACE_VERSION_MINOR 11)
@@ -15,7 +20,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_P
#search packages used by KDE
set(QT_MIN_VERSION "4.8.0")
-find_package(KDE4 4.9.4 REQUIRED)
+find_package(KDE4 4.9.95 REQUIRED)
include(KDE4Defaults)
option(WITH_XINERAMA "Xinerama support for multi-headed X displays" ON)
@@ -55,7 +60,7 @@ find_package(KDeclarative QUIET CONFIG)
set_package_properties(KDeclarative PROPERTIES DESCRIPTION "KDE Declarative (QML) support from kdelibs"
URL "http://www.kde.org"
TYPE REQUIRED
- PURPOSE "Required for building ksmserver"
+ PURPOSE "Required for building ksmserver and corebindingsplugin (org.kde.plasma.core)"
)
macro_optional_find_package(OpenGL)
@@ -157,8 +162,38 @@ set_package_properties(QJSON PROPERTIES DESCRIPTION "Library to manage JSON obje
PURPOSE "Required to build Chrome/Chromium support for Plasma Bookmarks Runners"
)
+find_package(LibGcrypt 1.5.0 REQUIRED QUIET)
+set_package_properties(LibGcrypt PROPERTIES DESCRIPTION "Libgcrypt is a general purpose cryptographic library based on the code from GnuPG."
+ URL "http://www.gnu.org/software/libgcrypt/"
+ TYPE REQUIRED
+ PURPOSE "kwalletd needs libgcrypt to perform PBKDF2-SHA512 hashing"
+ )
+
+macro_optional_find_package(SLP)
+set_package_properties(SLP PROPERTIES DESCRIPTION "SLP (Service Location Protocol) implementation"
+ URL "http://www.openslp.org/"
+ TYPE OPTIONAL
+ PURPOSE "Provides SLP support in the network:/ kioslave."
+ )
+
+find_package(LibAttica 0.1.4)
+set_package_properties(LibAttica PROPERTIES DESCRIPTION "A library to access Open Collaboration Service providers"
+ URL "https://projects.kde.org/attica"
+ TYPE REQUIRED
+ PURPOSE "Attica is needed for the Get Hot New Stuff support"
+ )
+
+macro_optional_find_package(QCA2 2.0.0)
+set_package_properties(QCA2 PROPERTIES DESCRIPTION "Support for remote plasma widgets"
+ URL "http://delta.affinix.com/qca"
+ TYPE OPTIONAL
+ )
+
+check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
+check_include_files(sys/time.h HAVE_SYS_TIME_H)
include(ConfigureChecks.cmake)
+configure_file (config-runtime.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-runtime.h )
if(NOT WIN32)
configure_file(config-unix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-unix.h )
configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h )
@@ -171,7 +206,7 @@ configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-works
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${KACTIVITIES_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/libs)
+include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${KACTIVITIES_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/libs)
# libs
add_subdirectory(cmake)
@@ -187,7 +222,6 @@ if(NOT WIN32)
macro_optional_add_subdirectory( kcheckpass )
macro_optional_add_subdirectory( kwin )
macro_optional_add_subdirectory( ksmserver )
- macro_optional_add_subdirectory( kdesu )
find_package(JPEG REQUIRED)
find_package(PNG REQUIRED)
@@ -242,7 +276,61 @@ macro_optional_add_subdirectory(plasma)
macro_optional_add_subdirectory(statusnotifierwatcher)
macro_optional_add_subdirectory(kstyles)
+# imported from kde-runtime
+macro_optional_add_subdirectory(kdesu)
+macro_optional_add_subdirectory(phonon)
+macro_optional_add_subdirectory(menu)
+macro_optional_add_subdirectory(khelpcenter)
+macro_optional_add_subdirectory(kwalletd)
+macro_optional_add_subdirectory(knotify)
+macro_optional_add_subdirectory(kuiserver)
+macro_optional_add_subdirectory(soliduiserver)
+macro_optional_add_subdirectory(solidautoeject)
+macro_optional_add_subdirectory(solid-device-automounter)
+macro_optional_add_subdirectory(solid-networkstatus)
+macro_optional_add_subdirectory(kdebugdialog)
+macro_optional_add_subdirectory(kcmshell)
+macro_optional_add_subdirectory(kioslave)
+macro_optional_add_subdirectory(kurifilter-plugins)
+macro_optional_add_subdirectory(kimgio)
+macro_optional_add_subdirectory(renamedlgplugins)
+if (Q_WS_X11)
+ macro_optional_add_subdirectory(kstart)
+endif (Q_WS_X11)
+macro_optional_add_subdirectory(kquitapp)
+# Background processes
+macro_optional_add_subdirectory(kpasswdserver)
+macro_optional_add_subdirectory(kdontchangethehostname)
+macro_optional_add_subdirectory(kglobalaccel)
+macro_optional_add_subdirectory(ktimezoned)
+# Command-line tools (e.g. for shell scripts)
+if ( UNIX )
+ macro_optional_add_subdirectory(kdeeject)
+endif ( UNIX )
+macro_optional_add_subdirectory(kfile)
+macro_optional_add_subdirectory(kiconfinder)
+macro_optional_add_subdirectory(kioclient)
+macro_optional_add_subdirectory(kioexec)
+macro_optional_add_subdirectory(ktraderclient)
+macro_optional_add_subdirectory(kreadconfig)
+macro_optional_add_subdirectory(kmimetypefinder)
+# UI Helper applications
+macro_optional_add_subdirectory(drkonqi)
+macro_optional_add_subdirectory(khelpcenter)
+macro_optional_add_subdirectory(knetattach)
+macro_optional_add_subdirectory(knewstuff)
+macro_optional_add_subdirectory(keditfiletype)
+# Default settings, content and config
+macro_optional_add_subdirectory(l10n)
+macro_optional_add_subdirectory(localization)
+macro_optional_add_subdirectory(kde-menu)
+# KDE integration for attica
+if(LIBATTICA_FOUND)
+ macro_optional_add_subdirectory(attica)
+endif(LIBATTICA_FOUND)
+
########### install files ###############
+install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/kde4 DESTINATION ${BIN_INSTALL_DIR})
if(NOT WIN32)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/startkde DESTINATION ${BIN_INSTALL_DIR})
endif(NOT WIN32)
diff --git a/attica/CMakeLists.txt b/attica/CMakeLists.txt
new file mode 100644
index 00000000..11d3e3b4
--- /dev/null
+++ b/attica/CMakeLists.txt
@@ -0,0 +1,5 @@
+include_directories(${LIBATTICA_INCLUDE_DIR})
+
+add_subdirectory(kdeplugin)
+add_subdirectory(kcm)
+
diff --git a/attica/kcm/CMakeLists.txt b/attica/kcm/CMakeLists.txt
new file mode 100644
index 00000000..976dace4
--- /dev/null
+++ b/attica/kcm/CMakeLists.txt
@@ -0,0 +1,14 @@
+set(kcm_attica_PART_SRCS
+ providerconfigwidget.cpp
+ atticamodule.cpp
+)
+
+kde4_add_ui_files(kcm_attica_PART_SRCS providermanagement.ui providerconfigwidget.ui)
+
+kde4_add_plugin(kcm_attica ${kcm_attica_PART_SRCS})
+
+target_link_libraries(kcm_attica ${LIBATTICA_LIBRARIES} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
+
+install(TARGETS kcm_attica DESTINATION ${PLUGIN_INSTALL_DIR})
+install(FILES kcm_attica.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+
diff --git a/attica/kcm/Messages.sh b/attica/kcm/Messages.sh
new file mode 100644
index 00000000..543c21ff
--- /dev/null
+++ b/attica/kcm/Messages.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
+$XGETTEXT *.cpp -o $podir/kcm_attica.pot
diff --git a/attica/kcm/TODO b/attica/kcm/TODO
new file mode 100644
index 00000000..9e6d8c96
--- /dev/null
+++ b/attica/kcm/TODO
@@ -0,0 +1,3 @@
+KDE4.5:
+- Check that password is more than 8 chars in length (something server should do)
+- Rename "Login" tab to "Login Settings" to not confuse user
diff --git a/attica/kcm/atticamodule.cpp b/attica/kcm/atticamodule.cpp
new file mode 100644
index 00000000..4e9205d2
--- /dev/null
+++ b/attica/kcm/atticamodule.cpp
@@ -0,0 +1,158 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2009 Eckhart Wörner
+ Copyright (c) 2010 Frederik Gladhorn
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#include "atticamodule.h"
+
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include "providerconfigwidget.h"
+
+
+K_PLUGIN_FACTORY(AtticaModuleFactory, registerPlugin();)
+K_EXPORT_PLUGIN(AtticaModuleFactory("kcm_attica"))
+
+AtticaModule::AtticaModule(QWidget* parent, const QVariantList&)
+ : KCModule(AtticaModuleFactory::componentData(), parent)
+{
+ KAboutData *about = new KAboutData(
+ "kcm_attica", 0, ki18n("Social Desktop"),
+ KDE_VERSION_STRING, KLocalizedString(), KAboutData::License_GPL,
+ ki18n("Copyright 2009 Eckhart Wörner"));
+ about->addAuthor(ki18n("Eckhart Wörner"), KLocalizedString(), "ewoerner@kde.org");
+ about->addAuthor(ki18n("Dmitry Suzdalev"), KLocalizedString(), "dimsuz@gmail.com");
+ about->addAuthor(ki18n("Frederik Gladhorn"), KLocalizedString(), "gladhorn@kde.org");
+ setAboutData(about);
+
+ m_ui.setupUi(this);
+
+ m_ui.addProviderButton->setIcon(KIcon("list-add"));
+ m_ui.removeProviderButton->setIcon(KIcon("list-remove"));
+
+ // FIXME
+ m_ui.removeProviderButton->setEnabled(false);
+
+ connect(m_ui.addProviderButton, SIGNAL(clicked()), this, SLOT(addProvider()));
+ connect(m_ui.removeProviderButton, SIGNAL(clicked()), this, SLOT(removeProvider()));
+
+ connect(m_ui.providerComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(providerSelected(int)));
+
+ connect(m_ui.providerConfigWidget, SIGNAL(changed(bool)),
+ this, SIGNAL(changed(bool)));
+
+ m_manager.setAuthenticationSuppressed(true);
+
+ connect(&m_manager, SIGNAL(providerAdded(const Attica::Provider&)), SLOT(providerAdded(const Attica::Provider&)));
+ connect(&m_manager, SIGNAL(defaultProvidersLoaded()), SLOT(onDefaultProvidersLoaded()));
+
+ startLoadingDefaultProviders();
+}
+
+AtticaModule::~AtticaModule()
+{
+}
+
+void AtticaModule::defaults()
+{
+}
+
+void AtticaModule::load()
+{
+ startLoadingDefaultProviders();
+}
+
+
+void AtticaModule::save()
+{
+ m_ui.providerConfigWidget->saveData();
+}
+
+void AtticaModule::startLoadingDefaultProviders()
+{
+ emit changed(true);
+ m_manager.clear();
+ m_manager.loadDefaultProviders();
+ m_ui.lblProviderList->setText(i18n("Loading provider list..."));
+ m_ui.providerComboBox->hide();
+ m_ui.providerConfigWidget->setEnabled(false);
+}
+
+void AtticaModule::providerAdded(const Attica::Provider& provider)
+{
+ // Add new provider
+ QString baseUrl = provider.baseUrl().toString();
+ int idx = m_ui.providerComboBox->findData(baseUrl);
+
+ if ( idx == -1)
+ {
+ kDebug() << "Adding provider" << baseUrl;
+ QString name = provider.name();
+ if (name.isEmpty())
+ name = baseUrl;
+ m_ui.providerComboBox->addItem(KIcon("system-users"), name, provider.baseUrl());
+ }
+
+ // set only if this is a first provider, otherwise it will be
+ // set on explicit selection
+ if (m_ui.providerComboBox->count() == 1) {
+ m_ui.providerConfigWidget->setProvider(provider);
+ }
+}
+
+void AtticaModule::providerSelected(int providerNumber)
+{
+ QUrl providerUrl = m_ui.providerComboBox->itemData(providerNumber).toUrl();
+ m_ui.providerConfigWidget->setProvider(m_manager.providerByUrl(providerUrl));
+}
+
+void AtticaModule::onDefaultProvidersLoaded()
+{
+ m_ui.lblProviderList->setText(i18n("Choose a provider to manage:"));
+ m_ui.providerComboBox->show();
+ m_ui.providerConfigWidget->setEnabled(true);
+
+ // at least now set it to not changed
+ emit changed(false);
+}
+
+void AtticaModule::addProvider()
+{
+ KUrlRequesterDialog dialog("http://", i18nc("addition of an attica/knewstuff provider by entering its url", "URL of the provider file (provider.xml)"), this);
+ if (dialog.exec() == KDialog::Accepted) {
+ kDebug() << "Add provider: " << dialog.selectedUrl();
+ m_manager.addProviderFileToDefaultProviders(dialog.selectedUrl());
+ }
+}
+
+void AtticaModule::removeProvider()
+{
+ //m_manager.removeProviderFileToDefaultProviders(url);
+}
+
+
+#include "atticamodule.moc"
diff --git a/attica/kcm/atticamodule.h b/attica/kcm/atticamodule.h
new file mode 100644
index 00000000..6c18bfb3
--- /dev/null
+++ b/attica/kcm/atticamodule.h
@@ -0,0 +1,64 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2009 Eckhart Wörner
+ Copyright (c) 2010 Frederik Gladhorn
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#ifndef ATTICAMODULE_H
+#define ATTICAMODULE_H
+
+#include
+
+#include
+
+#include "ui_providermanagement.h"
+
+
+namespace KWallet {
+ class Wallet;
+}
+
+class AtticaModule : public KCModule
+{
+ Q_OBJECT
+
+public:
+ AtticaModule(QWidget* parent, const QVariantList&);
+ ~AtticaModule();
+ void save();
+ void load();
+ void defaults();
+
+private Q_SLOTS:
+ void providerAdded(const Attica::Provider&);
+ void onDefaultProvidersLoaded();
+ void addProvider();
+ void removeProvider();
+ void providerSelected(int);
+
+private:
+ void startLoadingDefaultProviders();
+
+private:
+ Ui::ProviderManagement m_ui;
+ Attica::ProviderManager m_manager;
+};
+
+
+#endif
diff --git a/attica/kcm/kcm_attica.desktop b/attica/kcm/kcm_attica.desktop
new file mode 100644
index 00000000..ae8f5f60
--- /dev/null
+++ b/attica/kcm/kcm_attica.desktop
@@ -0,0 +1,148 @@
+[Desktop Entry]
+Exec=kcmshell4 kcm_attica
+Type=Service
+Icon=get-hot-new-stuff
+
+X-KDE-ServiceTypes=KCModule
+X-KDE-Library=kcm_attica
+X-KDE-ParentApp=kcontrol
+X-KDE-System-Settings-Parent-Category=account-details
+X-DocPath=kcontrol/attica/index.html
+
+Name=Social Desktop
+Name[ar]=سطح المكتب اجتماعي
+Name[ast]=Escritoriu social
+Name[bg]=Социален работен плот
+Name[bn]=সামাজিক ডেস্কটপ
+Name[bs]=Društvena površ
+Name[ca]=Escriptori social
+Name[ca@valencia]=Escriptori social
+Name[cs]=Sociální pracovní prostředí
+Name[da]=Social desktop
+Name[de]=Social-Desktop
+Name[el]=Κοινωνική επιφάνεια εργασίας
+Name[en_GB]=Social Desktop
+Name[eo]=Socia labortablo
+Name[es]=Escritorio social
+Name[et]=Sotsiaalne töölaud
+Name[eu]=Mahaigain soziala
+Name[fa]=رومیزی اجتماعی
+Name[fi]=Sosiaalinen työpöytä
+Name[fr]=Bureau social
+Name[ga]=Deasc Shóisialta
+Name[gl]=Escritorio social
+Name[gu]=સોશિયલ ડેસ્કટોપ
+Name[he]=שולחן עבודה חברתי
+Name[hi]=सामुहिक डेस्कटॉप
+Name[hr]=Društvena radna površina
+Name[hu]=Közösségi asztal
+Name[ia]=Scriptorio social
+Name[id]=Desktop Sosial
+Name[is]=Samskiptaskjáborð
+Name[it]=Desktop sociale
+Name[ja]=ソーシャルデスクトップ
+Name[kk]=Қоғамдық үстел
+Name[km]=ផ្ទៃតុសង្គម
+Name[kn]=ಸಾಮಾಜಿಕ ಗಣಕತೆರೆ
+Name[ko]=사회적 데스크톱
+Name[lt]=Socialinis darbastalis
+Name[lv]=Sociālā darbvirsma
+Name[mai]=समाज डेस्कटाप
+Name[ml]=സാമൂഹിക പണിയിടം
+Name[mr]=सामाजिक डेस्कटॉप
+Name[nb]=Sosialt skrivebord
+Name[nds]=Meenschap-Schriefdisch
+Name[nl]=Sociale bureaublad
+Name[nn]=Sosialt skrivebord
+Name[pa]=ਸਮਾਜਕ ਡੈਸਕਟਾਪ
+Name[pl]=Pulpit społecznościowy
+Name[pt]=Ambiente de Trabalho Social
+Name[pt_BR]=Área de Trabalho Social
+Name[ro]=Birou social
+Name[ru]=Social Desktop
+Name[si]=සමාජීය වැඩතලය
+Name[sk]=Sociálne pracovné prostredie
+Name[sl]=Družabno namizje
+Name[sr]=Друштвена површ
+Name[sr@ijekavian]=Друштвена површ
+Name[sr@ijekavianlatin]=Društvena površ
+Name[sr@latin]=Društvena površ
+Name[sv]=Socialt skrivbord
+Name[tg]=Мизи кории ҷамъиятӣ
+Name[th]=แวดวงสังคมออนไลน์
+Name[tr]=Sosyal Masaüstü
+Name[ug]=ئىجتىمائىي ئۈستەلئۈستى
+Name[uk]=Соціальна стільниця
+Name[vi]=Máy làm việc xã hội
+Name[wa]=Sicribanne sociå
+Name[x-test]=xxSocial Desktopxx
+Name[zh_CN]=社会化桌面
+Name[zh_TW]=Social 桌面
+Comment=Manage Social Desktop Providers
+Comment[ar]=أدر مزودي سطح المكتب الاجتماعي
+Comment[ast]=Xestionar fornidores del escritoriu social
+Comment[bg]=Управление на доставчици на социален работен плот
+Comment[bn]=সামাজিক ডেস্কটপ সরবরাহকারী ব্যবস্থাপনা
+Comment[bs]=Upravljanje dobavljačima društvene površi
+Comment[ca]=Gestiona els proveïdors de l'escriptori social
+Comment[ca@valencia]=Gestiona els proveïdors de l'escriptori social
+Comment[cs]=Spravovat poskytovatele sociálního pracovního prostředí
+Comment[da]=Håndtér udbydere af social desktop
+Comment[de]=Social-Desktop-Anbieter verwalten
+Comment[el]=Διαχείριση παρόχων κοινωνικής επιφάνειας εργασίας
+Comment[en_GB]=Manage Social Desktop Providers
+Comment[eo]=Mastrumi provizantojn de socia labortablo
+Comment[es]=Gestionar proveedores del escritorio social
+Comment[et]=Sotsiaalse töölaua pakkujate haldamine
+Comment[eu]=Mahaigain sozialen hornitzaileak kudeatzea
+Comment[fa]=مدیریت ارائه دهندگان میزکارهای اجتماعی
+Comment[fi]=Sosiaalisen työpöydän tarjoajien asetukset
+Comment[fr]=Gérer les fournisseurs de bureaux sociaux
+Comment[ga]=Bainistigh Soláthraithe na Deisce Shóisialta
+Comment[gl]=Xestión dos provedores de escritorio social
+Comment[gu]=સોશિઅલ ડેસ્કટોપ પૂરા પાડનારાઓનું સંચાલન કરો
+Comment[he]=משמש לניהול ספקי שולחן עבודה חברתי
+Comment[hi]=सामाजिक डेस्कटॉप प्रदाता को प्रबंधित करें
+Comment[hr]=Upravljanje pružateljima društvene radne površine
+Comment[hu]=Közösségiasztal-szolgáltatók kezelése
+Comment[ia]=Gere fornitores de Scriptorio Social
+Comment[id]=Atur Penyedia Desktop Sosial
+Comment[is]=Sýsla með efnisveitur fyrir samskiptaveftengt efni fyrir skjáborð
+Comment[it]=Gestisci i fornitori del desktop sociale
+Comment[ja]=ソーシャルデスクトッププロバイダを管理
+Comment[kk]=Әлеуметтік үстел провайдерлерін басқару
+Comment[km]=គ្រប់គ្រងក្រុមហ៊ុនផ្ដល់ផ្ទៃតុសង្គម
+Comment[kn]=ಸಾಮಾಜಿಕ ಗಣಕತೆರೆ ಪೂರೈಕೆದಾರರನ್ನು ನಿರ್ವಹಿಸು
+Comment[ko]=사회적 데스크톱 프로바이더 관리
+Comment[lt]=Tvarkyti socialinio darbastalio tiekėjus
+Comment[lv]=Pārvaldīt sociālās darbvirsmas sniedzējus
+Comment[ml]=സാമൂഹിക പണിയിട ദാതാക്കളെ കൈകാര്യം ചെയ്യുക
+Comment[mr]=सामाजिक डेस्कटॉप पुरवठाकर्ते नियंत्रीत करा
+Comment[nb]=Håndter sosialt skrivebord-leverandører
+Comment[nds]=Anbeders vun Meenschap-Schriefdischen plegen
+Comment[nl]=Leveranciers van sociale bureaubladen beheren
+Comment[nn]=Handsam sosialt skrivebord-leverandørar
+Comment[pa]=ਸਮਾਜਿਕ ਡੈਸਕਟਾਪ ਪਰੋਵਾਇਡਰ ਪਰਬੰਧ
+Comment[pl]=Zarządzanie dostawcami dla pulpitu społecznościowego
+Comment[pt]=Gerir os Fornecedores do Ambiente de Trabalho Social
+Comment[pt_BR]=Gerencia os fornecedores da Área de Trabalho Social
+Comment[ro]=Gestionează furnizorii de birou social
+Comment[ru]=Настройка Social Desktop
+Comment[si]=සමාජීය වැඩපත් සපයන්නන් කළමනාකරනය කරන්
+Comment[sk]=Správa poskytovateľov sociálneho pracovného prostredia
+Comment[sl]=Upravljanje s ponudniki družabnega namizja
+Comment[sr]=Управљање добављачима друштвене површи
+Comment[sr@ijekavian]=Управљање добављачима друштвене површи
+Comment[sr@ijekavianlatin]=Upravljanje dobavljačima društvene površi
+Comment[sr@latin]=Upravljanje dobavljačima društvene površi
+Comment[sv]=Hantera leverantörer av socialt skrivbord
+Comment[tg]=Идоракунии провайдерҳои мизи кории ҷамъиятӣ
+Comment[th]=จัดการผู้ให้บริการแวดวงสังคมออนไลน์
+Comment[tr]=Sosyal Masaüstü Hizmetlerini Yönet
+Comment[ug]=ئىجتىمائىي ئۈستەلئۈستى تەمىنلىگۈچىنى باشقۇرىدۇ
+Comment[uk]=Керування постачальниками даних соціальної стільниці
+Comment[vi]=Quản lý các nhà cung cấp máy làm việc xã hội
+Comment[wa]=Manaedjî des ahesseus d' sicribanne sociå
+Comment[x-test]=xxManage Social Desktop Providersxx
+Comment[zh_CN]=管理社会化桌面信息提供方
+Comment[zh_TW]=管理 Social 桌面提供者
diff --git a/attica/kcm/providerconfigwidget.cpp b/attica/kcm/providerconfigwidget.cpp
new file mode 100644
index 00000000..af1d4114
--- /dev/null
+++ b/attica/kcm/providerconfigwidget.cpp
@@ -0,0 +1,320 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2009 Eckhart Wörner
+ Copyright (c) 2009 Dmitry Suzdalev
+ Copyright (c) 2010 Frederik Gladhorn
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#include "providerconfigwidget.h"
+
+#include
+#include
+#include
+#include
+
+#include
+
+static const int loginTabIdx = 0;
+static const int registerTabIdx = 1;
+
+ProviderConfigWidget::ProviderConfigWidget(QWidget* parent)
+ : QWidget(parent)
+{
+ m_ui.setupUi(this);
+}
+
+void ProviderConfigWidget::setProvider(const Attica::Provider& provider)
+{
+ m_provider = provider;
+
+ // TODO ensure that it reinits all fields nicely for new provider!
+ initLoginPage();
+ initRegisterPage();
+
+ m_ui.userEditLP->setFocus();
+}
+
+void ProviderConfigWidget::initLoginPage()
+{
+ QString header;
+ if (m_provider.name().isEmpty()) {
+ header = i18n("Account details");
+ } else {
+ header = i18n("Account details for %1", m_provider.name());
+ }
+ m_ui.titleWidgetLogin->setText(header);
+ m_ui.tabWidget->setTabIcon(loginTabIdx, KIcon("applications-internet"));
+
+ if (m_provider.hasCredentials()) {
+ QString user;
+ QString password;
+ m_provider.loadCredentials(user, password);
+ kDebug() << "cred for: " << user;
+ m_ui.userEditLP->setText(user);
+ m_ui.passwordEditLP->setText(password);
+ } else {
+ m_ui.userEditLP->clear();
+ m_ui.passwordEditLP->clear();
+ }
+ m_ui.enableProviderCheckBox->setChecked(m_provider.isEnabled());
+ m_ui.testLoginButton->setIcon(KIcon("network-connect"));
+ m_ui.iconLabelLP->setPixmap(KIcon("help-about").pixmap(24,24));
+
+ connect(m_ui.userEditLP, SIGNAL(textChanged(const QString&)), this, SLOT(onLoginChanged()));
+ connect(m_ui.passwordEditLP, SIGNAL(textChanged(const QString&)), this, SLOT(onLoginChanged()));
+ connect(m_ui.testLoginButton, SIGNAL(clicked()), this, SLOT(onTestLogin()));
+ connect(m_ui.infoLabelLP, SIGNAL(linkActivated(const QString&)), this, SLOT(onInfoLinkActivated()));
+ connect(m_ui.enableProviderCheckBox, SIGNAL(clicked(bool)), this, SLOT(enableToggled(bool)));
+}
+
+void ProviderConfigWidget::initRegisterPage()
+{
+ QString header;
+ if (m_provider.name().isEmpty()) {
+ header = i18n("Register new account");
+ } else {
+ header = i18n("Register new account at %1", m_provider.name());
+ }
+ m_ui.titleWidgetRegister->setText(header);
+ m_ui.tabWidget->setTabIcon(registerTabIdx, KIcon("list-add-user"));
+
+ m_ui.infoLabelRP->setFont(KGlobalSettings::smallestReadableFont());
+
+ connect(m_ui.userEditRP, SIGNAL(textChanged(QString)), SLOT(onRegisterDataChanged()));
+ connect(m_ui.mailEdit, SIGNAL(textChanged(QString)), SLOT(onRegisterDataChanged()));
+ connect(m_ui.firstNameEdit, SIGNAL(textChanged(QString)), SLOT(onRegisterDataChanged()));
+ connect(m_ui.lastNameEdit, SIGNAL(textChanged(QString)), SLOT(onRegisterDataChanged()));
+ connect(m_ui.passwordEditRP, SIGNAL(textChanged(QString)), SLOT(onRegisterDataChanged()));
+ connect(m_ui.passwordRepeatEdit, SIGNAL(textChanged(QString)), SLOT(onRegisterDataChanged()));
+
+ connect(m_ui.registerButton, SIGNAL(clicked()), SLOT(onRegisterClicked()));
+
+ onRegisterDataChanged();
+}
+
+void ProviderConfigWidget::onLoginChanged()
+{
+ m_ui.testLoginButton->setText(i18n("Test login"));
+ m_ui.testLoginButton->setEnabled(true);
+ emit changed(true);
+}
+
+void ProviderConfigWidget::onTestLogin()
+{
+ m_ui.testLoginButton->setEnabled(false);
+ m_ui.testLoginButton->setText(i18n("Testing login..."));
+
+ Attica::PostJob* postJob = m_provider.checkLogin(m_ui.userEditLP->text(), m_ui.passwordEditLP->text());
+ connect(postJob, SIGNAL(finished(Attica::BaseJob*)), SLOT(onTestLoginFinished(Attica::BaseJob*)));
+ postJob->start();
+}
+
+void ProviderConfigWidget::onTestLoginFinished(Attica::BaseJob* job)
+{
+ Attica::PostJob* postJob = static_cast(job);
+
+ if (postJob->metadata().error() == Attica::Metadata::NoError) {
+ m_ui.testLoginButton->setText(i18n("Success"));
+ }
+
+ if (postJob->metadata().error() == Attica::Metadata::OcsError) {
+ m_ui.testLoginButton->setText(i18n("Login failed"));
+ }
+}
+
+void ProviderConfigWidget::enableToggled(bool enabled)
+{
+ m_provider.setEnabled(enabled);
+}
+
+void ProviderConfigWidget::onInfoLinkActivated()
+{
+ m_ui.tabWidget->setCurrentIndex(registerTabIdx);
+ m_ui.userEditRP->setFocus();
+}
+
+void ProviderConfigWidget::onRegisterDataChanged()
+{
+ QString login = m_ui.userEditRP->text();
+ QString mail = m_ui.mailEdit->text();
+ QString firstName = m_ui.firstNameEdit->text();
+ QString lastName = m_ui.lastNameEdit->text();
+ QString password = m_ui.passwordEditRP->text();
+ QString passwordRepeat = m_ui.passwordRepeatEdit->text();
+
+ bool isDataValid = (!login.isEmpty() && !mail.isEmpty() && !firstName.isEmpty() &&
+ !lastName.isEmpty() && !password.isEmpty());
+ bool isPasswordLengthValid = password.size() > 7;
+ bool isPasswordEqual = password == passwordRepeat;
+
+ if (!isDataValid) {
+ showRegisterHint("dialog-cancel", i18n("Not all required fields are filled"));
+ } else if (!isPasswordLengthValid) {
+ showRegisterHint("dialog-cancel", i18n("Password is too short"));
+ } else if (!isPasswordEqual) {
+ showRegisterHint("dialog-cancel", i18n("Passwords do not match"));
+ } else {
+ showRegisterHint("dialog-ok-apply", i18n("All required information is provided"));
+ }
+
+ m_ui.registerButton->setEnabled(isDataValid && isPasswordLengthValid && isPasswordEqual);
+
+ emit changed(true);
+}
+
+void ProviderConfigWidget::showRegisterHint(const QString& iconName, const QString& hint)
+{
+ m_ui.iconLabelRP->setPixmap(KIcon(iconName).pixmap(16,16));
+ m_ui.infoLabelRP->setText(hint);
+}
+
+void ProviderConfigWidget::showRegisterError(const Attica::Metadata& metadata)
+{
+ if (metadata.error() == Attica::Metadata::NetworkError) {
+ showRegisterHint("dialog-close", i18n("Failed to register new account."));
+ } else {
+ /*
+# 100 - successful / valid account
+# 101 - please specify all mandatory fields
+# 102 - please specify a valid password
+# 103 - please specify a valid login
+# 104 - login already exists
+# 105 - email already taken
+*/
+ // TODO: Looks like more correct place for this stuff is in libattica,
+ // for example metadata().statusString() or smth like that.
+ // So here will be only showRegisterHint("dialog-close", statusString);
+ // no switch.
+ QWidget* widgetToHighlight = 0;
+ QString hint;
+ switch (metadata.statusCode()) {
+ case 102:
+ hint = i18n("Failed to register new account: invalid password.");
+ widgetToHighlight = m_ui.passwordEditRP;
+ break;
+ case 103:
+ hint = i18n("Failed to register new account: invalid username.");
+ widgetToHighlight = m_ui.userEditRP;
+ break;
+ case 104:
+ hint = i18n("Failed to register new account: the requested username is already taken.");
+ widgetToHighlight = m_ui.userEditRP;
+ break;
+ case 105:
+ hint = i18n("Failed to register new account: the specified email address is already taken.");
+ widgetToHighlight = m_ui.mailEdit;
+ break;
+ case 106:
+ hint = i18n("Failed to register new account: the specified email address is invalid.");
+ widgetToHighlight = m_ui.mailEdit;
+ default:
+ hint = i18n("Failed to register new account.");
+ break;
+ }
+
+ if (!hint.isEmpty())
+ showRegisterHint("dialog-close", hint);
+
+ if (widgetToHighlight) {
+ QPalette pal = widgetToHighlight->palette();
+ KColorScheme::adjustBackground(pal, KColorScheme::NegativeBackground, QPalette::Base);
+ widgetToHighlight->setPalette(pal);
+ widgetToHighlight->setFocus();
+ }
+ }
+}
+
+void ProviderConfigWidget::clearHighlightedErrors()
+{
+ QList widList = allRegisterWidgets();
+ foreach (QWidget* wid, widList) {
+ QPalette pal = wid->palette();
+ KColorScheme::adjustBackground(pal, KColorScheme::NormalBackground, QPalette::Base);
+ wid->setPalette(pal);
+ }
+}
+
+void ProviderConfigWidget::onRegisterClicked()
+{
+ // here we assume that all data has been checked in onRegisterDataChanged()
+
+ clearHighlightedErrors();
+
+ QString login = m_ui.userEditRP->text();
+ QString mail = m_ui.mailEdit->text();
+ QString firstName = m_ui.firstNameEdit->text();
+ QString lastName = m_ui.lastNameEdit->text();
+ QString password = m_ui.passwordEditRP->text();
+ //QString passwordRepeat = m_ui.passwordRepeatEdit->text();
+
+ Attica::PostJob* postJob = m_provider.registerAccount(login, password, mail, firstName, lastName);
+ connect(postJob, SIGNAL(finished(Attica::BaseJob*)), SLOT(onRegisterAccountFinished(Attica::BaseJob*)));
+ postJob->start();
+ showRegisterHint("help-about", i18n("Registration is in progress..."));
+ m_ui.registerButton->setEnabled(false); // should be disabled while registering
+}
+
+void ProviderConfigWidget::onRegisterAccountFinished(Attica::BaseJob* job)
+{
+ Attica::PostJob* postJob = static_cast(job);
+
+ // this will enable "register" button if possible
+ onRegisterDataChanged();
+
+ if (postJob->metadata().error() == Attica::Metadata::NoError)
+ {
+ KMessageBox::information(this, i18n("Registration complete. New account was successfully registered. Please check your Email to activate the account."));
+
+ QString user = m_ui.userEditRP->text();
+ QString password = m_ui.passwordEditRP->text();
+ m_ui.userEditLP->setText(user);
+ m_ui.passwordEditLP->setText(password);
+
+ // clear register fields and switch to login page
+ foreach (QWidget* wid, allRegisterWidgets())
+ {
+ QLineEdit* le = qobject_cast(wid);
+ if (le)
+ le->clear();
+ }
+ m_ui.tabWidget->setCurrentIndex(loginTabIdx);
+ m_ui.userEditLP->setFocus();
+ }
+ else
+ {
+ kDebug() << "register error:" << postJob->metadata().error() << "statusCode:" << postJob->metadata().statusCode();
+ showRegisterError( postJob->metadata() );
+ }
+}
+
+void ProviderConfigWidget::saveData()
+{
+ m_provider.saveCredentials(m_ui.userEditLP->text(), m_ui.passwordEditLP->text());
+}
+
+QList ProviderConfigWidget::allRegisterWidgets() const
+{
+ QList widList;
+ widList << m_ui.userEditRP << m_ui.mailEdit << m_ui.firstNameEdit
+ << m_ui.lastNameEdit << m_ui.passwordEditRP << m_ui.passwordRepeatEdit;
+
+ return widList;
+}
+
+#include "providerconfigwidget.moc"
diff --git a/attica/kcm/providerconfigwidget.h b/attica/kcm/providerconfigwidget.h
new file mode 100644
index 00000000..2524e3c1
--- /dev/null
+++ b/attica/kcm/providerconfigwidget.h
@@ -0,0 +1,78 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2009 Eckhart Wörner
+ Copyright (c) 2009 Dmitry Suzdalev
+ Copyright (c) 2010 Frederik Gladhorn
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#ifndef PROVIDERCONFIGWIDGET_H
+#define PROVIDERCONFIGWIDGET_H
+
+#include
+
+#include
+
+#include "ui_providerconfigwidget.h"
+
+namespace Attica
+{
+ class Metadata;
+}
+
+class ProviderConfigWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ProviderConfigWidget(QWidget* parent = 0);
+ void setProvider(const Attica::Provider& provider);
+ void saveData();
+
+Q_SIGNALS:
+ void changed(bool hasChanged);
+
+private Q_SLOTS:
+ // login page
+ void onLoginChanged();
+ void onTestLogin();
+ void onTestLoginFinished(Attica::BaseJob* job);
+ void enableToggled(bool enabled);
+
+ // register page
+ void onInfoLinkActivated();
+ void onRegisterDataChanged();
+ void onRegisterClicked();
+ void onRegisterAccountFinished(Attica::BaseJob* job);
+
+
+private:
+ void initLoginPage();
+ void initRegisterPage();
+ void showRegisterHint(const QString&, const QString&);
+ void showRegisterError(const Attica::Metadata&);
+ void clearHighlightedErrors();
+
+ QList allRegisterWidgets() const;
+
+private:
+ Attica::Provider m_provider;
+ Ui::ProviderConfigWidget m_ui;
+};
+
+#endif
diff --git a/attica/kcm/providerconfigwidget.ui b/attica/kcm/providerconfigwidget.ui
new file mode 100644
index 00000000..902c5b7a
--- /dev/null
+++ b/attica/kcm/providerconfigwidget.ui
@@ -0,0 +1,572 @@
+
+
+ ProviderConfigWidget
+
+
+
+ 0
+ 0
+ 467
+ 453
+
+
+
+
+
+
+ 0
+
+
+
+ Login
+
+
+
+
+
+ 10
+
+
+
+
+ &Username:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ userEditLP
+
+
+
+
+
+
+
+
+
+ &Password:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ passwordEditLP
+
+
+
+
+
+
+ QLineEdit::Password
+
+
+
+
+
+
+ &Test Login
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 10
+ 10
+
+
+
+
+
+
+
+
+ 75
+ true
+
+
+
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 10
+
+
+
+
+
+
+
+ If a provider is not enabled, it will be ignored by the applications using the social desktop
+
+
+ Enabled
+
+
+ true
+
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 443
+ 174
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 16
+ 16
+
+
+
+ Qt::AlignHCenter|Qt::AlignTop
+
+
+
+
+
+
+ Do not have an account? Create one on the <a href="register">Register tab</a>
+
+
+ true
+
+
+
+
+
+
+
+
+ The Social Desktop Providers are used for "Get Hot New Stuff" and the "Community" and "Social News" Plasma applets.
+
+
+ true
+
+
+
+
+
+
+
+ Register
+
+
+
+
+
+ 10
+
+
+
+
+ Fill in the details below and click <b>Register...</b> button
+
+
+ true
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 29
+
+
+
+
+
+
+
+
+
+ &User name:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ userEditRP
+
+
+
+
+
+
+
+
+
+ &Email:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ mailEdit
+
+
+
+
+
+
+
+
+
+ &Password:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ passwordEditRP
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+ Repeat password:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ passwordRepeatEdit
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+ &First name:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ firstNameEdit
+
+
+
+
+
+
+
+
+
+ &Last name:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ lastNameEdit
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 16
+ 16
+
+
+
+ Qt::AlignHCenter|Qt::AlignTop
+
+
+
+
+
+
+
+
+
+ Qt::RichText
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ &Register...
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 15
+
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
+
+
+ 75
+ true
+
+
+
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 10
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 10
+
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ KLineEdit
+ QLineEdit
+ klineedit.h
+
+
+
+ tabWidget
+ userEditLP
+ passwordEditLP
+ testLoginButton
+ userEditRP
+ mailEdit
+ firstNameEdit
+ lastNameEdit
+ passwordEditRP
+ passwordRepeatEdit
+ registerButton
+
+
+
+
diff --git a/attica/kcm/providermanagement.ui b/attica/kcm/providermanagement.ui
new file mode 100644
index 00000000..cf169219
--- /dev/null
+++ b/attica/kcm/providermanagement.ui
@@ -0,0 +1,119 @@
+
+
+ ProviderManagement
+
+
+
+ 0
+ 0
+ 585
+ 492
+
+
+
+
+
+
+
+
+ Choose a provider to manage:
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+ QComboBox::AdjustToContents
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+ Add Provider
+
+
+
+
+
+
+ Remove Provider
+
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 15
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 15
+
+
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+
+
+ ProviderConfigWidget
+ QWidget
+ providerconfigwidget.h
+ 1
+
+
+
+
+
diff --git a/attica/kdeplugin/CMakeLists.txt b/attica/kdeplugin/CMakeLists.txt
new file mode 100644
index 00000000..3d27f688
--- /dev/null
+++ b/attica/kdeplugin/CMakeLists.txt
@@ -0,0 +1,10 @@
+################# KDE PLUGIN for LibAttica #################
+
+set(attica_kde_SRCS
+ kdeplatformdependent.cpp
+)
+
+kde4_add_plugin(attica_kde ${attica_kde_SRCS})
+target_link_libraries(attica_kde ${KDE4_KIO_LIBS} ${QT_QTMAIN_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_KCMUTILS_LIBS} )
+install(TARGETS attica_kde EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
+
diff --git a/attica/kdeplugin/Messages.sh b/attica/kdeplugin/Messages.sh
new file mode 100644
index 00000000..7721b2b3
--- /dev/null
+++ b/attica/kdeplugin/Messages.sh
@@ -0,0 +1,2 @@
+#! /bin/sh
+$XGETTEXT *.cpp -o $podir/attica_kde.pot
diff --git a/attica/kdeplugin/kdeplatformdependent.cpp b/attica/kdeplugin/kdeplatformdependent.cpp
new file mode 100644
index 00000000..d0041b8a
--- /dev/null
+++ b/attica/kdeplugin/kdeplatformdependent.cpp
@@ -0,0 +1,279 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2009 Eckhart Wörner
+ Copyright (c) 2010 Frederik Gladhorn
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see .
+
+*/
+
+#include "kdeplatformdependent.h"
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+using namespace Attica;
+
+KdePlatformDependent::KdePlatformDependent()
+ : m_config(KSharedConfig::openConfig("atticarc")), m_accessManager(0), m_wallet(0)
+{
+ // when a plain Qt application loads this plugin, it needs a valid KGlobal object
+ if (!KGlobal::hasMainComponent()) {
+ KComponentData componentData("attica_kde");
+ }
+
+ KLocale* locale = KGlobal::locale();
+ if (locale) {
+ locale->insertCatalog("attica_kde");
+ }
+
+ m_accessManager = new KIO::Integration::AccessManager(this);
+}
+
+KdePlatformDependent::~KdePlatformDependent()
+{
+ delete m_wallet;
+}
+
+bool KdePlatformDependent::openWallet(bool force)
+{
+ if (m_wallet) {
+ return true;
+ }
+
+ QString networkWallet = KWallet::Wallet::NetworkWallet();
+ // if not forced, or the folder doesn't exist, don't try to open the wallet
+ if (force || (!KWallet::Wallet::folderDoesNotExist(networkWallet, "Attica"))) {
+ m_wallet = KWallet::Wallet::openWallet(networkWallet, 0);
+ }
+
+ if (m_wallet) {
+ m_wallet->createFolder("Attica");
+ m_wallet->setFolder("Attica");
+ return true;
+ }
+ return false;
+}
+
+QNetworkReply* KdePlatformDependent::post(const QNetworkRequest& request, const QByteArray& data)
+{
+ return m_accessManager->post(removeAuthFromRequest(request), data);
+}
+
+QNetworkReply* KdePlatformDependent::post(const QNetworkRequest& request, QIODevice* data)
+{
+ return m_accessManager->post(removeAuthFromRequest(request), data);
+}
+
+QNetworkReply* KdePlatformDependent::get(const QNetworkRequest& request)
+{
+ return m_accessManager->get(removeAuthFromRequest(request));
+}
+
+QNetworkRequest KdePlatformDependent::removeAuthFromRequest(const QNetworkRequest& request)
+{
+ QStringList noauth;
+ noauth << "no-auth-prompt" << "true";
+ QNetworkRequest notConstReq = const_cast(request);
+ notConstReq.setAttribute(QNetworkRequest::User, noauth);
+ return notConstReq;
+}
+
+bool KdePlatformDependent::saveCredentials(const QUrl& baseUrl, const QString& user, const QString& password)
+{
+ m_passwords[baseUrl.toString()] = QPair (user, password);
+
+ if (!m_wallet && !openWallet(true)) {
+
+ if (KMessageBox::warningContinueCancel(0, i18n("Should the password be stored in the configuration file? This is unsafe.")
+ , i18n("Social Desktop Configuration"))
+ == KMessageBox::Cancel) {
+ return false;
+ }
+
+ // use kconfig
+ KConfigGroup group(m_config, baseUrl.toString());
+ group.writeEntry("user", user);
+ group.writeEntry("password", KStringHandler::obscure(password));
+ kDebug() << "Saved credentials in KConfig";
+ return true;
+ }
+
+ // Remove the entry when user name is empty
+ if (user.isEmpty()) {
+ m_wallet->removeEntry(baseUrl.toString());
+ return true;
+ }
+
+ QMap entries;
+ entries.insert("user", user);
+ entries.insert("password", password);
+ kDebug() << "Saved credentials in KWallet";
+
+ return !m_wallet->writeMap(baseUrl.toString(), entries);
+}
+
+
+bool KdePlatformDependent::hasCredentials(const QUrl& baseUrl) const
+{
+ if (m_passwords.contains(baseUrl.toString())) {
+ return true;
+ }
+
+ QString networkWallet = KWallet::Wallet::NetworkWallet();
+ if (!KWallet::Wallet::folderDoesNotExist(networkWallet, "Attica") &&
+ !KWallet::Wallet::keyDoesNotExist(networkWallet, "Attica", baseUrl.toString())) {
+ kDebug() << "Found credentials in KWallet";
+ return true;
+ }
+
+ KConfigGroup group(m_config, baseUrl.toString());
+ QString user;
+ user = group.readEntry("user", QString());
+ if (!user.isEmpty()) {
+ kDebug() << "Found credentials in KConfig";
+ return true;
+ }
+
+ kDebug() << "No credentials found";
+ return false;
+}
+
+
+bool KdePlatformDependent::loadCredentials(const QUrl& baseUrl, QString& user, QString& password)
+{
+ QString networkWallet = KWallet::Wallet::NetworkWallet();
+ if (KWallet::Wallet::folderDoesNotExist(networkWallet, "Attica") &&
+ KWallet::Wallet::keyDoesNotExist(networkWallet, "Attica", baseUrl.toString())) {
+ // use KConfig
+ KConfigGroup group(m_config, baseUrl.toString());
+ user = group.readEntry("user", QString());
+ password = KStringHandler::obscure(group.readEntry("password", QString()));
+ if (!user.isEmpty()) {
+ kDebug() << "Successfully loaded credentials from kconfig";
+ m_passwords[baseUrl.toString()] = QPair (user, password);
+ return true;
+ }
+ return false;
+ }
+
+ if (!m_wallet && !openWallet(true)) {
+ return false;
+ }
+
+ QMap entries;
+ if (m_wallet->readMap(baseUrl.toString(), entries) != 0) {
+ return false;
+ }
+ user = entries.value("user");
+ password = entries.value("password");
+ kDebug() << "Successfully loaded credentials.";
+
+ m_passwords[baseUrl.toString()] = QPair (user, password);
+
+ return true;
+}
+
+
+bool Attica::KdePlatformDependent::askForCredentials(const QUrl& baseUrl, QString& user, QString& password)
+{
+ Q_UNUSED(baseUrl);
+ Q_UNUSED(user);
+ Q_UNUSED(password);
+ kDebug() << "Attempting to start KCM for credentials";
+ KCMultiDialog KCM;
+ KCM.setWindowTitle( i18n( "Open Collaboration Providers" ) );
+ KCM.addModule( "kcm_attica" );
+
+ KCM.exec();
+
+ return false;
+}
+
+QList KdePlatformDependent::getDefaultProviderFiles() const
+{
+ KConfigGroup group(m_config, "General");
+ QStringList pathStrings = group.readPathEntry("providerFiles", QStringList("http://download.kde.org/ocs/providers.xml"));
+ QList paths;
+ foreach (const QString& pathString, pathStrings) {
+ paths.append(QUrl(pathString));
+ }
+ qDebug() << "Loaded paths from config:" << paths;
+ return paths;
+}
+
+void KdePlatformDependent::addDefaultProviderFile(const QUrl& url)
+{
+ KConfigGroup group(m_config, "General");
+ QStringList pathStrings = group.readPathEntry("providerFiles", QStringList("http://download.kde.org/ocs/providers.xml"));
+ QString urlString = url.toString();
+ if(!pathStrings.contains(urlString)) {
+ pathStrings.append(urlString);
+ group.writeEntry("providerFiles", pathStrings);
+ group.sync();
+ kDebug() << "wrote providers: " << pathStrings;
+ }
+}
+
+void KdePlatformDependent::removeDefaultProviderFile(const QUrl& url)
+{
+ KConfigGroup group(m_config, "General");
+ QStringList pathStrings = group.readPathEntry("providerFiles", QStringList("http://download.kde.org/ocs/providers.xml"));
+ pathStrings.removeAll(url.toString());
+ group.writeEntry("providerFiles", pathStrings);
+}
+
+void KdePlatformDependent::enableProvider(const QUrl& baseUrl, bool enabled) const
+{
+ KConfigGroup group(m_config, "General");
+ QStringList pathStrings = group.readPathEntry("disabledProviders", QStringList());
+ if (enabled) {
+ pathStrings.removeAll(baseUrl.toString());
+ } else {
+ if (!pathStrings.contains(baseUrl.toString())) {
+ pathStrings.append(baseUrl.toString());
+ }
+ }
+ group.writeEntry("disabledProviders", pathStrings);
+ group.sync();
+}
+
+bool KdePlatformDependent::isEnabled(const QUrl& baseUrl) const
+{
+ KConfigGroup group(m_config, "General");
+ return !group.readPathEntry("disabledProviders", QStringList()).contains(baseUrl.toString());
+}
+
+QNetworkAccessManager* Attica::KdePlatformDependent::nam()
+{
+ return m_accessManager;
+}
+
+
+Q_EXPORT_PLUGIN2(attica_kde, Attica::KdePlatformDependent)
+
+
+#include "kdeplatformdependent.moc"
diff --git a/attica/kdeplugin/kdeplatformdependent.h b/attica/kdeplugin/kdeplatformdependent.h
new file mode 100644
index 00000000..69883dba
--- /dev/null
+++ b/attica/kdeplugin/kdeplatformdependent.h
@@ -0,0 +1,79 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2009 Eckhart Wörner
+ Copyright (c) 2010 Frederik Gladhorn
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) version 3, or any
+ later version accepted by the membership of KDE e.V. (or its
+ successor approved by the membership of KDE e.V.), which shall
+ act as a proxy defined in Section 6 of version 3 of the license.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see .
+
+*/
+
+#ifndef ATTICA_KDEPLATFORMDEPENDENT_H
+#define ATTICA_KDEPLATFORMDEPENDENT_H
+
+#include
+
+#include
+
+#include
+#include
+
+
+namespace KWallet {
+ class Wallet;
+}
+
+namespace Attica {
+
+class KdePlatformDependent : public QObject, public Attica::PlatformDependent
+{
+ Q_OBJECT
+ Q_INTERFACES(Attica::PlatformDependent)
+
+public:
+ KdePlatformDependent();
+ virtual ~KdePlatformDependent();
+ virtual QList getDefaultProviderFiles() const;
+ virtual void addDefaultProviderFile(const QUrl& url);
+ virtual void removeDefaultProviderFile(const QUrl& url);
+ virtual void enableProvider(const QUrl& baseUrl, bool enabled) const;
+ virtual bool isEnabled(const QUrl& baseUrl) const;
+
+ virtual QNetworkReply* post(const QNetworkRequest& request, const QByteArray& data);
+ virtual QNetworkReply* post(const QNetworkRequest& request, QIODevice* data);
+ virtual QNetworkReply* get(const QNetworkRequest& request);
+ virtual bool saveCredentials(const QUrl& baseUrl, const QString& user, const QString& password);
+ virtual bool hasCredentials(const QUrl& baseUrl) const;
+ virtual bool loadCredentials(const QUrl& baseUrl, QString& user, QString& password);
+ virtual bool askForCredentials(const QUrl& baseUrl, QString& user, QString& password);
+ virtual QNetworkAccessManager* nam();
+
+private:
+ bool openWallet(bool force);
+ QNetworkRequest removeAuthFromRequest(const QNetworkRequest& request);
+
+ KSharedConfigPtr m_config;
+ //QNetworkAccessManager m_qnam;
+ KIO::Integration::AccessManager* m_accessManager;
+ KWallet::Wallet* m_wallet;
+ QHash > m_passwords;
+};
+
+}
+
+
+#endif
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index 2fd68b88..6fa94932 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -2,7 +2,9 @@
# don't glob for the files, since we don't want to
# install e.g. FindLibKNotification-1.cmake
-set(cmakeFiles FindDBus.cmake
+set(cmakeFiles FindCLucene.cmake
+ FindSLP.cmake
+ FindDBus.cmake
FindLibXKlavier.cmake
FindOpenGLES.cmake
FindPAM.cmake
diff --git a/cmake/modules/FindCLucene.cmake b/cmake/modules/FindCLucene.cmake
new file mode 100644
index 00000000..b7c0e862
--- /dev/null
+++ b/cmake/modules/FindCLucene.cmake
@@ -0,0 +1,97 @@
+#
+# This module looks for clucene (http://clucene.sf.net) support
+# It will define the following values
+#
+# CLUCENE_INCLUDE_DIR = where CLucene/StdHeader.h can be found
+# CLUCENE_LIBRARY_DIR = where CLucene/clucene-config.h can be found
+# CLUCENE_LIBRARY = the library to link against CLucene
+# CLUCENE_VERSION = The CLucene version string
+# CLucene_FOUND = set to 1 if clucene is found
+#
+
+INCLUDE(CheckSymbolExists)
+INCLUDE(FindLibraryWithDebug)
+
+if(NOT CLUCENE_MIN_VERSION)
+ set(CLUCENE_MIN_VERSION "0.9.19")
+endif(NOT CLUCENE_MIN_VERSION)
+
+IF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)
+ INCLUDE(${PROJECT_CMAKE}/CLuceneConfig.cmake)
+ENDIF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)
+
+SET(TRIAL_LIBRARY_PATHS
+ $ENV{CLUCENE_HOME}/lib${LIB_SUFFIX}
+ ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+ /usr/local/lib${LIB_SUFFIX}
+ /usr/lib${LIB_SUFFIX}
+ /sw/lib${LIB_SUFFIX}
+ /usr/pkg/lib${LIB_SUFFIX}
+ )
+SET(TRIAL_INCLUDE_PATHS
+ $ENV{CLUCENE_HOME}/include
+ ${CMAKE_INSTALL_PREFIX}/include
+ /usr/local/include
+ /usr/include
+ /sw/include
+ /usr/pkg/include
+ )
+FIND_LIBRARY_WITH_DEBUG(CLUCENE_LIBRARY
+ WIN32_DEBUG_POSTFIX d
+ NAMES clucene clucene-core
+ PATHS ${TRIAL_LIBRARY_PATHS})
+IF (CLUCENE_LIBRARY)
+ MESSAGE(STATUS "Found CLucene library: ${CLUCENE_LIBRARY}")
+ENDIF (CLUCENE_LIBRARY)
+FIND_PATH(CLUCENE_INCLUDE_DIR
+ NAMES CLucene.h
+ PATHS ${TRIAL_INCLUDE_PATHS})
+
+IF (CLUCENE_INCLUDE_DIR)
+ MESSAGE(STATUS "Found CLucene include dir: ${CLUCENE_INCLUDE_DIR}")
+ENDIF (CLUCENE_INCLUDE_DIR)
+
+IF(WIN32)
+ SET(TRIAL_LIBRARY_PATHS ${CLUCENE_INCLUDE_DIR})
+ENDIF(WIN32)
+
+SET(CLUCENE_GOOD_VERSION TRUE)
+
+FIND_PATH(CLUCENE_LIBRARY_DIR
+ NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS} NO_DEFAULT_PATH)
+IF (CLUCENE_LIBRARY_DIR)
+ MESSAGE(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}")
+ FILE(READ ${CLUCENE_LIBRARY_DIR}/CLucene/clucene-config.h CLCONTENT)
+ STRING(REGEX MATCH "_CL_VERSION +\".*\"" CLMATCH ${CLCONTENT})
+ IF (CLMATCH)
+ STRING(REGEX REPLACE "_CL_VERSION +\"(.*)\"" "\\1" CLUCENE_VERSION ${CLMATCH})
+ IF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
+ MESSAGE(ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}")
+ SET(CLUCENE_GOOD_VERSION FALSE)
+ ENDIF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
+ IF (CLUCENE_VERSION STREQUAL "0.9.17")
+ MESSAGE(ERROR "CLucene version 0.9.17 is not supported.")
+ SET(CLUCENE_GOOD_VERSION FALSE)
+ ENDIF (CLUCENE_VERSION STREQUAL "0.9.17")
+ ENDIF (CLMATCH)
+ENDIF (CLUCENE_LIBRARY_DIR)
+
+IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
+ SET(CLucene_FOUND TRUE)
+ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
+
+IF(CLucene_FOUND)
+ IF(NOT CLucene_FIND_QUIETLY)
+ MESSAGE(STATUS "Found CLucene: ${CLUCENE_LIBRARY} version ${CLUCENE_VERSION}")
+ ENDIF(NOT CLucene_FIND_QUIETLY)
+ELSE(CLucene_FOUND)
+ IF(CLucene_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find CLucene.")
+ ENDIF(CLucene_FIND_REQUIRED)
+ENDIF(CLucene_FOUND)
+
+MARK_AS_ADVANCED(
+ CLUCENE_INCLUDE_DIR
+ CLUCENE_LIBRARY_DIR
+ CLUCENE_LIBRARY
+ )
diff --git a/cmake/modules/FindLibGcrypt.cmake b/cmake/modules/FindLibGcrypt.cmake
new file mode 100644
index 00000000..e2a0b9dc
--- /dev/null
+++ b/cmake/modules/FindLibGcrypt.cmake
@@ -0,0 +1,81 @@
+#.rst
+# FindLibGcrypt
+# -------------
+#
+# Finds the Libgcrypt library.
+#
+# This will define the following variables:
+#
+# ``LIBGCRYPT_FOUND``
+# True if the requested version of gcrypt was found
+# ``LIBGCRYPT_VERSION``
+# The version of gcrypt that was found
+# ``LIBGCRYPT_INCLUDE_DIRS``
+# The gcrypt include directories
+# ``LIBGCRYPT_LIBRARIES``
+# The linker libraries needed to use the gcrypt library
+
+# Copyright 2014 Nicolás Alvarez
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_program(LIBGCRYPTCONFIG_SCRIPT NAMES libgcrypt-config)
+if(LIBGCRYPTCONFIG_SCRIPT)
+ execute_process(COMMAND "${LIBGCRYPTCONFIG_SCRIPT}" --prefix OUTPUT_VARIABLE PREFIX)
+ set(LIBGCRYPT_LIB_HINT "${PREFIX}/lib")
+ set(LIBGCRYPT_INCLUDE_HINT "${PREFIX}/include")
+endif()
+
+find_library(LIBGCRYPT_LIBRARY
+ NAMES gcrypt
+ HINTS ${LIBGCRYPT_LIB_HINT}
+)
+find_path(LIBGCRYPT_INCLUDE_DIR
+ NAMES gcrypt.h
+ HINTS ${LIBGCRYPT_INCLUDE_HINT}
+)
+
+if(LIBGCRYPT_INCLUDE_DIR)
+ file(STRINGS ${LIBGCRYPT_INCLUDE_DIR}/gcrypt.h GCRYPT_H REGEX "^#define GCRYPT_VERSION ")
+ string(REGEX REPLACE "^#define GCRYPT_VERSION \"(.*)\".*$" "\\1" LIBGCRYPT_VERSION "${GCRYPT_H}")
+endif()
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(LibGcrypt
+ REQUIRED_VARS LIBGCRYPT_LIBRARY LIBGCRYPT_INCLUDE_DIR
+ VERSION_VAR LIBGCRYPT_VERSION
+)
+if(LIBGCRYPT_FOUND)
+ set(LIBGCRYPT_LIBRARIES ${LIBGCRYPT_LIBRARY})
+ set(LIBGCRYPT_INCLUDE_DIRS ${LIBGCRYPT_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(LIBGCRYPT_LIBRARY LIBGCRYPT_INCLUDE_DIR)
+
+include(FeatureSummary)
+set_package_properties(LibGcrypt PROPERTIES
+ DESCRIPTION "A general purpose cryptographic library based on the code from GnuPG."
+ URL "http://www.gnu.org/software/libgcrypt/"
+)
diff --git a/cmake/modules/FindLibSSH.cmake b/cmake/modules/FindLibSSH.cmake
new file mode 100644
index 00000000..aeb685ad
--- /dev/null
+++ b/cmake/modules/FindLibSSH.cmake
@@ -0,0 +1,80 @@
+# - Try to find LibSSH
+# Once done this will define
+#
+# LIBSSH_FOUND - system has LibSSH
+# LIBSSH_INCLUDE_DIRS - the LibSSH include directory
+# LIBSSH_LIBRARIES - Link these to use LibSSH
+# LIBSSH_DEFINITIONS - Compiler switches required for using LibSSH
+#
+# Copyright (c) 2009-2014 Andreas Schneider
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+find_path(LIBSSH_INCLUDE_DIR
+ NAMES
+ libssh/libssh.h
+ PATHS
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ ${CMAKE_INCLUDE_PATH}
+ ${CMAKE_INSTALL_PREFIX}/include
+)
+
+find_library(SSH_LIBRARY
+ NAMES
+ ssh
+ libssh
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ ${CMAKE_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX}/lib
+)
+
+set(LIBSSH_LIBRARIES
+ ${LIBSSH_LIBRARIES}
+ ${SSH_LIBRARY}
+)
+
+if (LIBSSH_INCLUDE_DIR AND LibSSH_FIND_VERSION)
+ file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR
+ REGEX "#define[ ]+LIBSSH_VERSION_MAJOR[ ]+[0-9]+")
+
+ # Older versions of libssh like libssh-0.2 have LIBSSH_VERSION but not LIBSSH_VERSION_MAJOR
+ if (LIBSSH_VERSION_MAJOR)
+ string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MAJOR ${LIBSSH_VERSION_MAJOR})
+ file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MINOR
+ REGEX "#define[ ]+LIBSSH_VERSION_MINOR[ ]+[0-9]+")
+ string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MINOR ${LIBSSH_VERSION_MINOR})
+ file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_PATCH
+ REGEX "#define[ ]+LIBSSH_VERSION_MICRO[ ]+[0-9]+")
+ string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_PATCH ${LIBSSH_VERSION_PATCH})
+
+ set(LIBSSH_VERSION ${LIBSSH_VERSION_MAJOR}.${LIBSSH_VERSION_MINOR}.${LIBSSH_VERSION_PATCH})
+
+ else (LIBSSH_VERSION_MAJOR)
+ message(STATUS "LIBSSH_VERSION_MAJOR not found in ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h, assuming libssh is too old")
+ set(LIBSSH_FOUND FALSE)
+ endif (LIBSSH_VERSION_MAJOR)
+endif (LIBSSH_INCLUDE_DIR AND LibSSH_FIND_VERSION)
+
+# If the version is too old, but libs and includes are set,
+# find_package_handle_standard_args will set LIBSSH_FOUND to TRUE again,
+# so we need this if() here.
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LibSSH
+ REQUIRED_VARS
+ LIBSSH_LIBRARIES
+ LIBSSH_INCLUDE_DIR
+ VERSION_VAR
+ LIBSSH_VERSION)
+
+# show the LIBSSH_INCLUDE_DIRS and LIBSSH_LIBRARIES variables only in the advanced view
+mark_as_advanced(LIBSSH_INCLUDE_DIR LIBSSH_LIBRARIES)
diff --git a/cmake/modules/FindQNtrack.cmake b/cmake/modules/FindQNtrack.cmake
new file mode 100644
index 00000000..7a6d57b7
--- /dev/null
+++ b/cmake/modules/FindQNtrack.cmake
@@ -0,0 +1,70 @@
+# - Try to find the QNtrack library
+# Once done this will define
+#
+# QNTRACK_FOUND - system has the CK Connector
+# QNTRACK_INCLUDE_DIR - the CK Connector include directory
+# QNTRACK_LIBRARIES - the libraries needed to use CK Connector
+
+# Copyright (C) 2010 Sune Vuorela
+# modeled after FindCkConnector.cmake:
+# Copyright (c) 2008, Kevin Kofler,
+# modeled after FindLibArt.cmake:
+# Copyright (c) 2006, Alexander Neundorf,
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if(QNTRACK_INCLUDE_DIR AND QNTRACK_LIBRARIES)
+
+ # in cache already
+ SET(QNTRACK_FOUND TRUE)
+
+else (QNTRACK_INCLUDE_DIR AND QNTRACK_LIBRARIES)
+
+ IF (NOT WIN32)
+ FIND_PACKAGE(PkgConfig)
+ IF (PKG_CONFIG_FOUND)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ pkg_check_modules(_QNTRACK_PC QUIET libntrack-qt4 )
+ ENDIF (PKG_CONFIG_FOUND)
+ ENDIF (NOT WIN32)
+
+ FIND_PATH(QNTRACK_QT_INCLUDE_DIR QNtrack.h
+ ${_QNTRACK_PC_INCLUDE_DIRS}
+ )
+ #Hide from cmake user interfaces
+ SET(QNTRACK_QT_INCLUDE_DIR ${QNTRACK_QT_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
+
+ FIND_PATH(NTRACK_INCLUDE_DIR ntrackmonitor.h
+ ${_QNTRACK_PC_INCLUDE_DIRS}
+ )
+ #Hide from cmake user interfaces
+ SET(NTRACK_INCLUDE_DIR ${NTRACK_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
+
+ FIND_LIBRARY(QNTRACK_LIBRARIES NAMES ntrack-qt4
+ PATHS
+ ${_QNTRACK_PC_LIBDIR}
+ )
+
+
+ if (QNTRACK_QT_INCLUDE_DIR AND NTRACK_INCLUDE_DIR AND QNTRACK_LIBRARIES)
+ set(QNTRACK_FOUND TRUE)
+ set(QNTRACK_INCLUDE_DIR ${QNTRACK_QT_INCLUDE_DIR} ${NTRACK_INCLUDE_DIR})
+ endif (QNTRACK_QT_INCLUDE_DIR AND NTRACK_INCLUDE_DIR AND QNTRACK_LIBRARIES)
+
+
+ if (QNTRACK_FOUND)
+ if (NOT QNtrack_FIND_QUIETLY)
+ message(STATUS "Found QNtrack: ${QNTRACK_LIBRARIES}")
+ endif (NOT QNtrack_FIND_QUIETLY)
+ else (QNTRACK_FOUND)
+ if (QNtrack_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find QNtrack")
+ endif (QNtrack_FIND_REQUIRED)
+ endif (QNTRACK_FOUND)
+
+ MARK_AS_ADVANCED(QNTRACK_INCLUDE_DIR QNTRACK_LIBRARIES)
+
+endif (QNTRACK_INCLUDE_DIR AND QNTRACK_LIBRARIES)
diff --git a/cmake/modules/FindSLP.cmake b/cmake/modules/FindSLP.cmake
new file mode 100644
index 00000000..4e87fa45
--- /dev/null
+++ b/cmake/modules/FindSLP.cmake
@@ -0,0 +1,22 @@
+# cmake macro to test SLP LIB
+
+# Copyright (c) 2006, 2007 Laurent Montel,
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (SLP_INCLUDE_DIR AND SLP_LIBRARIES)
+ # Already in cache, be silent
+ set(SLP_FIND_QUIETLY TRUE)
+endif (SLP_INCLUDE_DIR AND SLP_LIBRARIES)
+
+
+FIND_PATH(SLP_INCLUDE_DIR slp.h)
+
+FIND_LIBRARY(SLP_LIBRARIES NAMES slp libslp)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SLP DEFAULT_MSG SLP_LIBRARIES SLP_INCLUDE_DIR )
+
+MARK_AS_ADVANCED(SLP_INCLUDE_DIR SLP_LIBRARIES)
diff --git a/cmake/modules/MacroDBusAddActivationService.cmake b/cmake/modules/MacroDBusAddActivationService.cmake
new file mode 100644
index 00000000..7305d64b
--- /dev/null
+++ b/cmake/modules/MacroDBusAddActivationService.cmake
@@ -0,0 +1,9 @@
+macro(dbus_add_activation_service _sources)
+ foreach (_i ${_sources})
+ get_filename_component(_service_file ${_i} ABSOLUTE)
+ string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i})
+ set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file})
+ configure_file(${_service_file} ${_target})
+ install(FILES ${_target} DESTINATION ${DBUS_SERVICES_INSTALL_DIR} )
+ endforeach (_i ${ARGN})
+endmacro(dbus_add_activation_service _sources)
diff --git a/config-runtime.h.cmake b/config-runtime.h.cmake
new file mode 100644
index 00000000..3db7a8ab
--- /dev/null
+++ b/config-runtime.h.cmake
@@ -0,0 +1,47 @@
+/* config-runtime.h. Generated by cmake from config-runtime.h.cmake */
+
+/* media HAL backend compilation */
+#undef COMPILE_HALBACKEND
+
+/* Define if you have long long as datatype */
+#cmakedefine HAVE_LONG_LONG 1
+
+/* Define to 1 if you have the `nice' function. */
+#cmakedefine HAVE_NICE 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#cmakedefine HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `sigset' function. */
+#cmakedefine HAVE_SIGSET 1
+
+/* Define to 1 if you have the header file. */
+#cmakedefine HAVE_STRING_H 1
+
+/* Define to 1 if you have the header file. */
+#cmakedefine HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the header file. */
+#cmakedefine HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the header file. */
+#cmakedefine HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the header file. */
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the header file. */
+#cmakedefine HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the header file. */
+#cmakedefine HAVE_UNISTD_H 1
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#define _FILE_OFFSET_BITS 64
+
+/*
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
+ */
+
+/* type to use in place of socklen_t if not defined */
+#define kde_socklen_t socklen_t
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index af00f4cd..67147f49 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -7,6 +7,22 @@ add_subdirectory(plasma-desktop)
add_subdirectory(kcontrol)
add_subdirectory(systemsettings)
add_subdirectory(kinfocenter)
+
if(POLKITQT_FOUND)
add_subdirectory(PolicyKit-kde)
endif(POLKITQT_FOUND)
+
+if ( UNIX )
+ add_subdirectory(kdesu)
+endif ( UNIX )
+
+add_subdirectory(kcontrol)
+add_subdirectory(glossary)
+add_subdirectory(kdebugdialog)
+add_subdirectory(khelpcenter)
+add_subdirectory(kioslave)
+add_subdirectory(knetattach)
+add_subdirectory(onlinehelp)
+add_subdirectory(documentationnotfound)
+add_subdirectory(fundamentals)
+add_subdirectory(plasmapkg)
\ No newline at end of file
diff --git a/doc/api/Doxyfile.local b/doc/api/Doxyfile.local
new file mode 100644
index 00000000..952cc6a8
--- /dev/null
+++ b/doc/api/Doxyfile.local
@@ -0,0 +1,25 @@
+## Warn about everything, just like in kdelibs.
+WARN_IF_UNDOCUMENTED = YES
+## Be strict, we want all parameters
+## to be documented as well.
+WARN_NO_PARAMDOC = YES
+
+## Sort methods to make 'same as above' easier.
+SORT_MEMBER_DOCS = YES
+
+## Remove unsightly export macros
+PREDEFINED = Q_EXPORT="" \
+ Q_GUI_EXPORT="" \
+ KWIN_EXPORT="" \
+ KFONTINST_EXPORT="" \
+ PLASMA_EXPORT="" \
+ LIBDOLPHINPRIVATE_EXPORT="" \
+ KONQSIDEBAR_EXPORT="" \
+ KONQSIDEBARPLUGIN_EXPORT="" \
+ SOLIDCONTROL_EXPORT="" \
+ SOLIDCONTROLIFACES_EXPORT="" \
+ KNEPREGCORE_EXPORT= "" \
+ KDEUI_EXPORT="" \
+ KDE_EXPORT="" \
+ Q_SLOTS="slots" \
+ Q_SIGNALS="signals"
diff --git a/doc/documentationnotfound/CMakeLists.txt b/doc/documentationnotfound/CMakeLists.txt
new file mode 100644
index 00000000..9d35fb34
--- /dev/null
+++ b/doc/documentationnotfound/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR khelpcenter/documentationnotfound)
diff --git a/doc/documentationnotfound/index.docbook b/doc/documentationnotfound/index.docbook
new file mode 100644
index 00000000..c7a81198
--- /dev/null
+++ b/doc/documentationnotfound/index.docbook
@@ -0,0 +1,66 @@
+
+
+
+]>
+
+Documentation not Found
+
+
+Jack
+Ostroff
+
+ostroffjh@users.sourceforge.net
+
+
+
+
+
+2010-09-21
+&kde; 4.5
+
+
+
+The requested documentation was not found on your computer.
+Normally, &kde; looks for application handbooks in a location that depends
+on how &kde; was installed on your computer. There are a number of
+possible reasons why it could not find the documentation you
+requested. The document might not exist, or it may not have been
+installed along with the application.
+
+How to solve this issue:
+
+Start by searching the KDE
+Documentation site for the requested documentation. If you find
+the documentation on that site, your distribution might ship a separate
+package for documentation (⪚ called kdepim-doc for all applications
+from the kdepim module, like &kmail;, &kontact;, &etc;). Please use the
+package manager of your distribution to find and install the missing
+documentation.
+
+If you use a source based distribution, such as Gentoo, be sure that
+there are not any configuration settings (USE flags in Gentoo) that
+might have disabled the installation of the documentation.
+
+
+If you have done that, but still get this page displayed instead of the
+application handbook, you probably found a bug in the &kde; help
+system. In this case, please report this on the KDE Bug Tracker.
+
+
+If you do not find any documentation on the KDE Documentation site, the
+application may not have offline documentation. Please report this on
+the KDE Bug Tracker.
+
+
+In case the application does not have offline documentation, you should
+use the online resources UserBase Documentation and
+KDE Community Forums to get
+help.
+
+
+
\ No newline at end of file
diff --git a/doc/fundamentals/CMakeLists.txt b/doc/fundamentals/CMakeLists.txt
new file mode 100644
index 00000000..dd75aec8
--- /dev/null
+++ b/doc/fundamentals/CMakeLists.txt
@@ -0,0 +1 @@
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en)
diff --git a/doc/fundamentals/colors.png b/doc/fundamentals/colors.png
new file mode 100644
index 00000000..7059435b
Binary files /dev/null and b/doc/fundamentals/colors.png differ
diff --git a/doc/fundamentals/config.docbook b/doc/fundamentals/config.docbook
new file mode 100644
index 00000000..5de09be6
--- /dev/null
+++ b/doc/fundamentals/config.docbook
@@ -0,0 +1,391 @@
+
+Customizing &kde; software
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+Customizing Toolbars
+
+
+
+
+
+The &gwenview; Toolbar
+
+
+The &gwenview; toolbar.
+
The toolbar in
+&gwenview;.
+
+
+
+
+
+Modifying Toolbar Items
+
+To customize an application's toolbars, go to
+SettingsConfigure
+Toolbars... or right-click on a toolbar and select
+Configure Toolbars....
+
+On the left side of the toolbar configuration panel, the available items
+that you can put in your toolbar are shown. On the right, the ones that already
+appear on the toolbar are shown. At the top, you can select the toolbar
+you wish to modify or view.
+
+Above each side of the panel there is a Filter text
+box you can use to easily find items in the list.
+
+
+The Customize Toolbars Window
+
+
+The Customize Toolbars window.
+
The Customize Toolbars window in &gwenview; with the
+Previous button selected.
+
+
+
+
+Adding an Item
+You can add an item to your toolbar by selecting it from the left side and
+clicking on the right arrow button.
+
+
+
+Removing an Item
+You can remove an item by selecting it and clicking the left arrow
+button.
+
+
+
+
+Changing the Position of Items
+
+You can change the position of the items by moving them lower or higher in
+the list. To move items lower, press the down arrow button, while to move items
+higher press the up arrow button. You can also change items' position by
+dragging and dropping them.
+
+On horizontal toolbars, the item that's on top will be the one on the left.
+On vertical toolbars, items are arranged as they appear in the toolbar.
+
+
+
+
+Adding a Separator
+You can add separator lines between items by adding a
+--- separator --- item to the toolbar.
+
+
+
+Restoring Defaults
+
+You can restore your toolbar to the way it was when you installed the
+application by pressing the Defaults button at the bottom
+of the window and then confirming your decision.
+
+
+
+
+Changing Text and Icons
+
+You can change the icon and text of individual toolbar items by selecting
+an item and clicking either the Change Icon... or
+Change Text... button.
+
+
+
+
+
+Customizing Toolbar Appearance
+
+You can change the appearance of toolbars by right-clicking on a toolbar
+to access it's context menu.
+
+
+Text Position
+
+You can change the appearance of text on toolbars in the
+Text Position submenu of a toolbar's context menu.
+
+You can choose from:
+
+
+
+Icons -
+only the icon for each toolbar item will appear.
+
+
+
+Text -
+only the text label for each toolbar item will appear.
+
+
+
+Text Alongside Icons -
+
+the text label will appear to the right of each toolbar item's icon
+
+
+
+Text Under Icons -
+the text label will appear underneath each toolbar item's icon
+
+
+
+
+You can also show or hide text for individual toolbar items by
+right-clicking on an item and checking or unchecking the item under
+Show Text.
+
+
+
+
+Icon Size
+
+You can change the size of toolbar items' icons by selecting
+Icon Size from the toolbar's context menu.
+
+You can choose from the following options: (each lists the icon size
+in pixels)
+
+
+Small (16x16)
+Medium (22x22)
+ [the default value]
+Large (32x32)
+Huge (48x48)
+
+
+
+
+
+Moving Toolbars
+
+In order to move toolbars, you must unlock them. To do
+so, uncheck Lock Toolbar Positions from a toolbar's
+context menu. To restore the lock, simply recheck this menu item.
+
+You can change a toolbar's position from the
+Orientation submenu of its context menu.
+
+You can choose from:
+
+Top
+ [the default in many applications]
+Left
+Right
+Bottom
+
+
+You can also move a toolbar by clicking and holding onto the dotted line
+at the left of horizontal toolbars or the top of vertical toolbars and dragging
+it to your desired location.
+
+
+
+
+Show/Hide Toolbars
+
+If your application has only one toolbar, you can hide a toolbar by
+deselecting Show Toolbar from either the toolbar's
+context menu or the Settings menu. To restore the toolbar,
+select Show Toolbar from the Settings
+menu. Note that toolbars must be unlocked to hide them from their
+context menu; see for more
+information.
+
+If your application has more than one toolbar, a submenu called
+Toolbars Shown will appear in the context menu and
+Settings menu instead of the above menu entry. From that
+menu you may select individual toolbars to hide and show.
+
+
+
+
+
+Thanks and Acknowledgments
+Thanks to an anonymous Google Code-In 2011 participant for writing much
+of this section.
+
+
+
+
+
+
+
+
+AlexeySubach
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+
+
+
+Using and Customizing Shortcuts
+
+
+Introduction
+
+Many &kde; applications allow you to configure keyboard shortcuts. To open
+the standard keyboard shortcuts configuration panel, go to
+SettingsConfigure
+Shortcuts....
+
+In the Configure Shortcuts window, you will see a list of all the shortcuts
+available in the current application. You can use the search box at the top to
+search for the shortcut you want.
+
+
+The Customize Shortcuts Window
+
+
+The Customize Shortcuts window.
+
Searching for shortcuts with file in
+&dolphin;.
+
+
+
+
+
+
+
+Changing a Shortcut
+
+To change a shortcut, first click on the name of a shortcut you want to change.
+You will see a radio group where you can choose whether to set the shortcut to its
+default value, or select a new shortcut for the selected action. To set a new shortcut,
+choose Custom and click on the button next to it. Then just
+type the shortcut you would like to use, and your changes will be saved.
+
+
+Setting a Shortcut
+
+
+The Customize Shortcuts window demonstrating how to
+set a shortcut.
+
+
+
+
+
+
+Resetting Shortcuts
+There is a button at the bottom of the window, called Reset to
+Defaults. Clicking on this button will reset all your custom shortcuts
+to their default values.
+
+You can also reset an individual shortcut to its default value by selecting
+it, and choosing the Default radio button.
+
+
+
+
+Removing a Shortcut
+
+To remove a shortcut, select it from the list, then click the remove icon (a
+black arrow with a cross) to the right of the button that allows you to select
+a shortcut.
+
+
+
+
+Working with Schemes
+
+Schemes are keyboard shortcuts configuration profiles, so you can create
+several profiles with different shortcuts and switch between these profiles
+easily.
+
+This feature is under development. It is not possible to import
+schemes using a &GUI; at this time.
+
+
+Working with Schemes
+
+
+The Customize Shortcuts window displaying the scheme
+editing tools.
+
Editing a scheme called work.
+
+
+
+To see a menu allowing you to edit schemes, click on the
+Details button at the bottom of the form. The following
+options will appear:
+
+
+
+
+Current Scheme
+Allows you to switch between your schemes.
+
+
+
+New...
+Creates a new scheme. This opens a window that lets you select
+a name for your new scheme.
+
+
+
+Delete
+Deletes the current scheme.
+
+
+
+More Actions
+
+Opens the following menu:
+
+
+
+Save as Scheme Defaults
+Sets the current scheme as the default for all new schemes.
+
+
+
+Export Scheme...
+Exports the current scheme to a file named applicationnameschemenameshortcuts.rc.
+
+Move this file to the folder $KDEDIR/apps/applicationname/
+and the exported scheme will be available in the drop down box labelled Current Scheme
+
+
+
+
+
+
+
+
+
+
+
+Printing Shortcuts
+
+You can print out a list of shortcuts for easy reference by clicking the
+Print button at the bottom of the window.
+
+
+
+
+Thanks and Acknowledgments
+
+Special thanks to Google Code-In 2011 participant Alexey Subach for
+writing much of this section.
+
+
+
+
+
+
diff --git a/doc/fundamentals/files-locationbar-breadcrumb.png b/doc/fundamentals/files-locationbar-breadcrumb.png
new file mode 100644
index 00000000..a1dfc26c
Binary files /dev/null and b/doc/fundamentals/files-locationbar-breadcrumb.png differ
diff --git a/doc/fundamentals/files-locationbar-context-menu.png b/doc/fundamentals/files-locationbar-context-menu.png
new file mode 100644
index 00000000..f26b9c34
Binary files /dev/null and b/doc/fundamentals/files-locationbar-context-menu.png differ
diff --git a/doc/fundamentals/files-locationbar-editable.png b/doc/fundamentals/files-locationbar-editable.png
new file mode 100644
index 00000000..8bd6ac3a
Binary files /dev/null and b/doc/fundamentals/files-locationbar-editable.png differ
diff --git a/doc/fundamentals/files-locationbar-places-icon.png b/doc/fundamentals/files-locationbar-places-icon.png
new file mode 100644
index 00000000..1b620f74
Binary files /dev/null and b/doc/fundamentals/files-locationbar-places-icon.png differ
diff --git a/doc/fundamentals/files-open.png b/doc/fundamentals/files-open.png
new file mode 100644
index 00000000..e6b45374
Binary files /dev/null and b/doc/fundamentals/files-open.png differ
diff --git a/doc/fundamentals/files-save.png b/doc/fundamentals/files-save.png
new file mode 100644
index 00000000..d584bff3
Binary files /dev/null and b/doc/fundamentals/files-save.png differ
diff --git a/doc/fundamentals/find-find-inline.png b/doc/fundamentals/find-find-inline.png
new file mode 100644
index 00000000..58c1ebb2
Binary files /dev/null and b/doc/fundamentals/find-find-inline.png differ
diff --git a/doc/fundamentals/find-find.png b/doc/fundamentals/find-find.png
new file mode 100644
index 00000000..6201a039
Binary files /dev/null and b/doc/fundamentals/find-find.png differ
diff --git a/doc/fundamentals/find-found.png b/doc/fundamentals/find-found.png
new file mode 100644
index 00000000..0a9dd906
Binary files /dev/null and b/doc/fundamentals/find-found.png differ
diff --git a/doc/fundamentals/find-replace-inline.png b/doc/fundamentals/find-replace-inline.png
new file mode 100644
index 00000000..0bef63a1
Binary files /dev/null and b/doc/fundamentals/find-replace-inline.png differ
diff --git a/doc/fundamentals/find-replace.png b/doc/fundamentals/find-replace.png
new file mode 100644
index 00000000..81b7f750
Binary files /dev/null and b/doc/fundamentals/find-replace.png differ
diff --git a/doc/fundamentals/fonts.png b/doc/fundamentals/fonts.png
new file mode 100644
index 00000000..1e371176
Binary files /dev/null and b/doc/fundamentals/fonts.png differ
diff --git a/doc/fundamentals/index.docbook b/doc/fundamentals/index.docbook
new file mode 100644
index 00000000..ee269960
--- /dev/null
+++ b/doc/fundamentals/index.docbook
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+ Gwenview'>
+
+
+
+
+
+ &kde; &plasma; Desktop">
+ &plasma; Active">
+ Meta">
+
+
+
+
+
+
+]>
+
+
+&kde; Fundamentals
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+
+
+201120122013
+&TC.Hollingsworth;
+
+
+2011
+Alexey Subach
+
+
+2011
+Salma Sultana
+
+&FDLNotice;
+
+2013-12-08
+&kde; 4.12
+
+
+This guide provides an introduction to the &kde-sc; and describes many
+common tasks that can be performed in all &kde; applications.
+
+
+
+KDE
+introduction
+user interface
+menus
+files
+open
+save
+spelling
+spellcheck
+find
+replace
+colors
+configuration
+customization
+toolbars
+installation
+compiling
+
+
+
+
+
+Introduction
+Welcome to &kde;!
+
+This guide will introduce you to the many features of the &kde-sc; and
+describe many common tasks you can perform in all &kde; applications.
+
+For more information on &kde;, visit the
+KDE website.
+
+
+
+&install-chapter;
+
+&ui-chapter;
+
+&tasks-chapter;
+
+&config-chapter;
+
+
+
+Credits and License
+
+The original idea for this guide was proposed by Chusslove Illich and
+brought to fruition with input from &Burkhard.Lueck;, Yuri Chornoivan, and
+&TC.Hollingsworth;
+
+Much of it was written by participants of
+Google
+Code-In 2011. Thanks to Google for sponsoring their excellent work!
+
+
+
+&underFDL;
+&underGPL;
+
+
+
+&documentation.index;
+
+
+
+
+
diff --git a/doc/fundamentals/install.docbook b/doc/fundamentals/install.docbook
new file mode 100644
index 00000000..ffc1f0d1
--- /dev/null
+++ b/doc/fundamentals/install.docbook
@@ -0,0 +1,127 @@
+
+Installing the &kde-sc;
+
+You can install the &kde-sc; on a variety of different platforms, ranging from
+smartphones and tablets to computers running &Microsoft; &Windows;, &MacOS;,
+&UNIX;, &BSD; or &Linux;. Binary packages are available for many different
+platforms and distributions, or advanced users may build the source code.
+
+
+Installing Packages
+
+Hundreds of developers worldwide have done a lot of work to make it easy
+to install &kde; on a variety of different devices and platforms.
+
+
+&Linux;
+
+Nearly every &Linux; distribution provides binary packages for individual
+&kde-sc; applications and the &plasma-workspaces; as a whole.
+
+To install an individual application, look for its name in your
+distribution's package collection. To install one of the &plasma-workspaces;,
+like &plasma-desktop;, look for a metapackage or package
+group, typically kde-desktop.
+
+
+Some core applications may be installed together with other core
+applications in a combined package named after the &kde; package they are
+provided in. For instance, &dolphin; might be found in the
+kde-baseapps package.
+
+
+If you have trouble locating &kde; packages for your distribution, please
+contact their support resources. Many distributions also have a team dedicated
+to packaging &kde; that can provide assistance specific to &kde;
+
+
+
+
+
+
+&Microsoft; &Windows;
+
+The &kde; on Windows Initiative provides binary packages of &kde-sc;
+applications for &Microsoft; &Windows;. They also provide a special installer
+application that permits you to install individual applications or groups and
+all necessary dependencies easily.
+
+For more information on the initiative and to download the installer,
+visit the KDE on Windows Initiative.
+
+
+
+
+
+
+
+&MacOS;
+
+Individual &kde-sc; applications can be installed through several
+different ports systems available for &MacOS;. Several different
+&kde; applications also provide their own binary builds for &MacOS;.
+
+For more information, visit
+&kde; on &MacOS;X.
+
+
+
+
+&BSD;
+
+Most &BSD; distributions allows you to install &kde-sc; applications
+and the &plasma-workspaces; as a whole through their ports
+system.
+
+For more information on installing ports, see your &BSD; distribution's
+documentation.
+
+
+
+
+
+
+Mobile Devices
+
+&plasma-active; is an exciting initiative to bring a new &kde;
+experience to mobile devices like smartphones or tablets. Binary releases are
+provided for several different devices.
+
+For more information, visit
+&plasma-active;.
+
+
+
+
+Live Media
+
+Several &Linux; and &BSD; distributions offer live media. This permits you
+to try out the &plasma-workspaces; without installing anything to your system.
+All you have to do insert a CD or connect a USB drive and boot from it. If you
+like what you see, most offer an option to install it to your hard drive.
+
+There is a list
+of distributions that offer the &kde-sc; on live media on the &kde; website.
+
+
+
+Building from Source Code
+
+For detailed information on how to compile and install &kde;
+applications see
+
+Building and Running &kde; Software From Source on &kde; TechBase.
+
+Since &kde; software uses cmake you should
+have no trouble compiling it. Should you run into problems please report them to the
+&kde; mailing lists.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/fundamentals/menus.png b/doc/fundamentals/menus.png
new file mode 100644
index 00000000..37c806a2
Binary files /dev/null and b/doc/fundamentals/menus.png differ
diff --git a/doc/fundamentals/shortcuts-schemes.png b/doc/fundamentals/shortcuts-schemes.png
new file mode 100644
index 00000000..5316cf6e
Binary files /dev/null and b/doc/fundamentals/shortcuts-schemes.png differ
diff --git a/doc/fundamentals/shortcuts-search.png b/doc/fundamentals/shortcuts-search.png
new file mode 100644
index 00000000..19bb85b2
Binary files /dev/null and b/doc/fundamentals/shortcuts-search.png differ
diff --git a/doc/fundamentals/shortcuts-set.png b/doc/fundamentals/shortcuts-set.png
new file mode 100644
index 00000000..7158e2cc
Binary files /dev/null and b/doc/fundamentals/shortcuts-set.png differ
diff --git a/doc/fundamentals/spellcheck-check.png b/doc/fundamentals/spellcheck-check.png
new file mode 100644
index 00000000..8d4a468b
Binary files /dev/null and b/doc/fundamentals/spellcheck-check.png differ
diff --git a/doc/fundamentals/tasks.docbook b/doc/fundamentals/tasks.docbook
new file mode 100644
index 00000000..f4804899
--- /dev/null
+++ b/doc/fundamentals/tasks.docbook
@@ -0,0 +1,1198 @@
+
+Common Tasks
+
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+Navigating Documents
+
+
+Scrolling
+
+You're probably familiar with the scrollbar that appears on the right side
+(and sometimes the bottom) of documents, allowing you to move within documents.
+However, there are several other ways you can navigate documents, some of which
+are faster and easier.
+
+Several mice have a wheel in the middle. You can move it up and down to
+scroll within a document. If you press the &Shift; key while using the mouse
+wheel, the document will scroll faster.
+
+If you're using a portable computer like a laptop, you might also be able
+to scroll using the touchpad. Some computers allow you to scroll vertically
+by moving your finger up and down the rightmost side of the touchpad, and allow
+you to scroll horizontally by moving your finger across the bottommost side
+of the touchpad. Others let you scroll using two fingers: move both fingers
+up and down anywhere on the touchpad to scroll vertically, and move them left
+and right to scroll horizontally. Since this functionality emulates the mouse
+wheel functionality described above, you can also press the &Shift; key while
+you do this to scroll faster.
+
+If you use the &plasma-workspaces;, you can control mouse wheel behavior
+in the Mouse module in &systemsettings;,
+and you can control touchpad scrolling behavior in the Touchpad module in
+&systemsettings;. Otherwise, look in the configuration area of your operating
+system or desktop environment.
+
+Additionally, the scrollbar has several options in its context menu. You
+can access these by right-clicking anywhere on the scrollbar. The following
+options are available:
+
+
+
+
+Scroll here
+Scroll directly to the location represented by where you
+right-clicked on the scrollbar. This is the equivalent of simply clicking on
+that location on the scrollbar.
+
+
+
+
+&Ctrl;Home
+Top
+
+Go to the beginning of the document.
+
+
+
+
+&Ctrl;End
+Bottom
+
+Go to the end of the document.
+
+
+
+
+PgUp
+Page up
+
+Navigate to the previous page in a document that represents a
+printed document, or one screen up in other types of documents.
+
+
+
+
+PgDown
+Page down
+
+Navigate to the next page in a document that represents a
+printed document, or one screen down in other types of documents.
+
+
+
+
+Scroll up
+Scroll up one unit (usually a line) in the document. This is
+the equivalent of clicking the up arrow at the top of the scrollbar.
+
+
+
+
+Scroll down
+Scroll down one unit (usually a line) in the document. This is
+the equivalent of clicking the down arrow at the bottom of the scrollbar.
+
+
+
+
+
+
+
+
+Zooming
+
+Many applications permit you to zoom. This makes the text or image you
+are viewing larger or smaller. You can generally find the zoom function in the
+View menu, and sometimes in the status bar
+of the application.
+
+You can also zoom using the keyboard by pressing
+&Ctrl;+ to zoom in, or
+&Ctrl;- to zoom out. If you
+can scroll with the mouse wheel or touchpad as described in
+, you can also zoom by pressing &Ctrl; and scrolling
+that way.
+
+
+
+
+
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+Opening and Saving Files
+
+
+Introduction
+
+Many &kde; applications work with files. Most applications have a
+File menu with options that allow you to open and save files.
+For more information on that, see . However,
+there are lots of different operations that require selecting a file. Regardless
+of the method, all &kde; applications generally use the same file selection
+window.
+
+
+The File Open Window
+
+
+The File Open window.
+
Opening a file in
+&konqueror;.
+
+
+
+
+
+
+
+The File Selection Window
+
+
+
+
+
+
+The Toolbar
+
+This contains standard navigation tool buttons:
+
+
+
+Back
+Causes the folder view to change to the previously displayed
+folder in its history. This button is disabled, if there is no previous item.
+
+
+
+
+Forward
+Causes the folder view to change to the next folder in its
+history. This button is disabled, if there is no next folder.
+
+
+
+Parent Folder
+This will cause the folder view to change to the immediate
+parent of the currently displayed folder, if possible.
+
+
+
+Reload (F5)
+Reloads the folder view, displaying any changes that have been
+made since it was first loaded or last reloaded.
+
+
+
+Show Preview
+Displays a preview of each file inside the folder view.
+
+
+
+
+Zoom Slider
+This allows you to change the size of the icon or preview
+shown in the folder view.
+
+
+
+Options
+
+
+
+
+
+OptionsSorting
+
+
+
+
+
+
+OptionsSorting
+By Name
+
+Sort files listed in the folder view alphabetically by name.
+
+
+
+
+
+OptionsSorting
+By Size
+
+Sort files listed in the folder view in order of their file
+size.
+
+
+
+
+OptionsSorting
+By Date
+
+Sort files listed in the folder view by the date they were last
+modified.
+
+
+
+
+OptionsSorting
+By Type
+
+Sort files listed in the folder view alphabetically by their
+file type.
+
+
+
+
+OptionsSorting
+Descending
+
+When unchecked (the default), files in the folder view will be
+sorted in ascending order. (For instance, files sorted alphabetically will
+be sorted from A to Z, while files sorted numerically will be sorted from
+smallest to largest.) When checked, files in the folder will be sorted in
+descending order (in reverse).
+
+
+
+
+OptionsSorting
+Folders First
+
+When enabled (the default), folders will appear before regular
+files.
+
+
+
+
+
+
+
+
+OptionsView
+
+
+
+
+
+
+OptionsView
+Short View
+
+Displays only the filenames.
+
+
+
+
+OptionsView
+Detailed View
+
+Displays Name, Date
+and Size of the files.
+
+
+
+
+OptionsView
+Tree View
+
+Like Short View, but folders can be expanded to view their contents.
+
+
+
+
+OptionsView
+Detailed Tree View
+
+This also allows folders to be expanded, but displays the additional columns
+available in Detailed View.
+
+
+
+
+
+
+
+
+
+ &Alt;.
+
+OptionsShow Hidden Files
+
+Displays files or folders normally hidden by your operating system.
+
+The alternate shortcut for this action is F8.
+
+
+
+
+
+F9
+OptionsShow Places Navigation Panel
+
+Displays the places panel which provides quick access
+to bookmarked locations and disks or other media.
+
+
+
+
+OptionsShow Bookmarks
+
+Displays an additional icon on the toolbar that provides
+access to bookmarks, a list of saved locations.
+
+
+
+
+OptionsShow Aside Preview
+
+Displays a preview of the currently highlighted file to the
+right of the folder view.
+
+
+
+
+
+
+
+Bookmarks
+Opens a submenu to edit or add bookmarks and to add a new
+bookmark folder.
+
+
+
+
+
+
+
+
+Location Bar
+
+The location bar, which can be found on top of the folder view, displays
+the path to the current folder. The location bar has two modes:
+
+
+
+Bread Crumb Mode
+
+In the bread crumb mode, which is the default, each folder
+name in the path to the current folder is a button which can be clicked to quickly
+open that folder. Moreover, clicking the > sign to the right of
+a folder opens a menu which permits to quickly open a subfolder of that folder.
+
+
+
+Screenshot of the location bar in bread crumb mode
+
+
+
+
+
+Location bar in bread crumb mode.
+
+
Location bar in bread crumb mode.
+
+
+
+
+
+
+
+Editable Mode
+
+When in bread crumb mode, clicking in the gray area to the right of the path
+with the &LMB; switches the location bar to the editable mode,
+in which the path can be edited using the keyboard. To switch back to bread
+crumb mode, click the check mark at the right of the location bar with the &LMB;.
+
+
+
+Screenshot of the location bar in editable mode
+
+
+
+
+
+Location bar in editable mode.
+
+
Location bar in editable mode.
+
+
+
+
+
+
+
+
+
+
+The context menu of the location bar offers action to switch between the modes and
+to copy and paste the path using the clipboard. Check the last option in this context menu to
+display either the full path starting with the root folder of the file system or to display
+the path starting with the current places entry.
+
+
+
+Location bar context menu
+
+
+
+
+
+Location bar context menu
+
+
+
+
+
+
+
+
+The Places List
+This provides the standard &kde; list of Places, shared with
+&dolphin; and other file management tools.
+
+
+
+The Folder View
+
+The largest part of the file selection window is the area that lists all
+items in the current directory. To select a file, you can double-click on it,
+or choose one and hit Open or
+Save.
+
+You can also select multiple files at once. To select specific files, or
+to unselect specific files that are already selected, press and hold &Ctrl;,
+click on each file, then release &Ctrl;. To select a
+contiguous group of files, click the first file, press and hold &Shift;, click
+on the last file in the group, and release &Shift;.
+
+The Folder View supports a limited set of file operations, which can be
+accessed by right-clicking on a file to access its context menu, or using
+keyboard shortcuts. The following items are available in the context menu:
+
+
+
+
+Create New...
+Create a new file or folder.
+
+
+
+Move to Trash...
+(Del)
+Move the currently selected item to the trash.
+
+
+
+Sorting
+This submenu can also be accessed from the toolbar, and is
+described in .
+
+
+
+View
+This submenu can also be accessed from the toolbar, and is
+described in .
+
+
+
+Open File Manager
+Opens the current folder in your default file manager
+application.
+
+
+
+Properties
+(&Alt;&Enter;)
+Open the Properties window that allows you to view and modify
+various types of metadata related to the currently selected file.
+
+
+
+
+
+
+
+The Preview Pane
+If enabled, this displays a preview of the currently highlighted
+file.
+
+
+
+The Name Entry
+When a file is selected, a name will appear in this text box.
+You may also manually enter a file name or path in this text box.
+
+
+
+The Filter Entry
+
+When opening a file, the Filter entry allows you to
+enter a filter for the files displayed in the folder view. The filter uses
+standard globs; patterns must be separated by white space. For instance, you can
+enter *.cpp *.h *.moc to display several different
+common &Qt; programming files.
+
+To display all files, enter a single asterisk
+(*).
+
+The filter entry saves the last 10 filters entered between
+sessions. To use one, press the arrow button on the right of the entry
+and select the desired filter string. You can disable the filter by pressing
+the Clear text button to the left of the autocompletion
+arrow button.
+
+When saving a file, the Filter entry will instead
+display a drop down box that allows you to select from all the file types the
+application supports. Select one to save a file in that format.
+
+
+
+
+Automatically select filename extension
+When saving a file, this check box will appear. When selected
+(the default), the application will automatically append the default file
+extension for the selected file type to the end of the file name, if it does
+not already appear in the Name entry. The file extension
+that will be used is listed in parenthesis at the end of the check box label.
+
+
+
+The File Save Window
+
+
+The File Save window.
+
Saving a file in
+&konqueror;.
+
+
+
+
+
+
+
+
+The Open or Save Button
+Depending on the action being performed, an
+Open or Save button will be
+displayed. Clicking on this button will close the file selection window and
+perform the requested action.
+
+
+
+The Cancel Button
+Clicking Cancel will close the file
+dialog without performing any action.
+
+
+
+
+
+
+
+Thanks and Acknowledgments
+
+Special thanks to Google Code-In 2011 participant Alexey Subach for
+writing parts of this section.
+
+
+
+
+
+
+
+
+
+&David.Sweet; &David.Sweet.mail;
+SalmaSultana
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+Check Spelling
+
+&sonnet; is the spelling checker used by &kde; applications such as &kate;,
+&kmail;, and &kword;. It is a &GUI; frontend to various free spell checkers.
+
+To use &sonnet; you need to install a spell checker like
+&GNU; Aspell, Enchant,
+Hspell, ISpell or
+Hunspell and additionally the corresponding
+dictionaries for the languages that you wish to use.
+
+
+Check Spelling
+
+
+The Check Spelling Window
+
+
+
+
+
+The Check spelling window.
+
+
Correcting a misspelling.
+
+
+
+To check spelling, go to Tools
+Spelling....
+
+If a word is possibly misspelled in your document, it is displayed in the
+top line in the dialog. &sonnet; tries to appropriate word(s) for replacement.
+The best guess is displayed to the right of Replace with.
+To accept this replacement, click on Replace.
+
+&sonnet; also allows you to select a word from the list of suggestions and
+replace the misspelled word with that selected word. With the help of the
+Suggest button, you can add more suggestions from the
+dictionary to the suggestions list.
+
+Click on Ignore to keep your original spelling.
+
+Click on Finished to stop spellchecking and
+keep the changes made.
+
+Click on Cancel to stop spellchecking and
+cancel the changes already made.
+
+Click on Replace All to automatically replace
+the misspelled word(s) with the chosen replacement word, if they appear again in
+your document later.
+
+Click on Ignore All to ignore the spelling at
+that point and all the future occurrences of the word misspelled.
+
+Click on Add to Dictionary to add the misspelled
+word to your personal dictionary.
+
+The Personal Dictionary is a distinct dictionary from the
+system dictionary and the additions made by you will not be seen by others.
+
+The drop down box Language at the bottom of this
+dialog allows you to switch to another dictionary temporarily.
+
+
+
+
+Automatic Spell Checking
+
+
+
+In many applications, you can automatically check spelling as you type.
+To enable this feature, select Tools
+Automatic Spell Checking.
+
+Potentially misspelled words will be underlined in red. To select a
+suggestion, right click on the word, select the Spelling
+submenu, and select the suggestion. You may also instruct &sonnet; to ignore
+this spelling for this document by selecting Ignore Word,
+or you may select Add to Dictionary to save it in your
+personal dictionary.
+
+
+
+
+Configuring &sonnet;
+
+To change your dictionary, go to Tools
+Change Dictionary.... A small window will
+appear at the bottom of the current document that will allow you to change your
+dictionary.
+
+
+For more information on configuring &sonnet;, see the
+Spell Checker &systemsettings; module
+documentation
+
+
+
+
+Thanks and Acknowledgments
+
+Special thanks to Google Code-In 2011 Participant Salma Sultana for writing
+much of this section.
+
+
+
+
+
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+Find and Replace
+
+
+The Find function of many &kde-sc; applications lets you find specific
+text in a document, while the Replace function allows you to replace text that
+is found with different text you provide.
+
+You can find both these functions in the Edit menu of
+many &kde; applications. For more information on this menu, see
+.
+
+
+The Find Function
+
+The Find function searches for text in a document and selects it.
+
+
+The Find Window
+
+
+The Find window.
+
Searching for software in
+&kmail;'s composer window.
+
+
+
+
+To use Find in many applications, go to Edit
+Find... or press
+&Ctrl;F. Then, in the
+Text to find: text box, enter the text that you want to
+find.
+
+If Regular expression is checked you will be able to
+search using regular expressions. Click on Edit to select
+from and enter commonly used regular expression characters, like
+White Space or Start of Line. If
+&kate; is installed, you can find
+more information on writing
+regular expressions in its documentation.
+
+
+You can limit the found results by configuring these options:
+
+
+
+Case sensitive
+Capital and lowercase characters are considered different. For
+example, if you search for This, results that contain
+this will not be returned.
+
+
+
+Whole words only
+By default, when the application searches for text, it will
+return results even in the middle of other text. For instance, if you search
+for is it will stop on every word that contains that,
+like this or
+history. If you check this option, the
+application will only return results when the search text is a word by itself,
+that is, surrounded by whitespace.
+
+
+
+From cursor
+The search will start from the location of the cursor and stop
+at the end of the text.
+
+
+
+Find backwards
+By default, the application searches for the text starting at
+the beginning of the document, and move through it to the end. If you check this
+option, it will instead start at the end and work its way to the beginning.
+
+
+
+
+Selected text
+Select this option to search only in the text that is currently
+selected, not the entire document. It is disabled when no text is selected.
+
+
+
+
+
+The Find function only selects the first match that it finds. You can
+continue searching by selecting EditFind Next
+or by pressing F3.
+
+
+Example of a Search
+
+
+Example of a search.
+
&kmail; displays a match for software.
+
+
+
+
+
+Applications which use the &kde; text editor component show a search bar instead of the Find window. See &kwrite; documentation for additional information on the search bar.
+
+
+The search bar in &kate;.
+
+
+The search bar in &kate;.
+
Searching for software in &kate;'s search bar.
+
+
+
+
+
+
+
+The Replace Function
+
+The Replace function searches for text in a document and replaces it with
+other text. You can find it in many application at
+EditReplace...
+or by pressing &Ctrl;R.
+
+
+The Replace Window
+
+
+The Replace window.
+
Replacing food with
+drink in &kmail;
+
+
+
+The window of the Replace function is separated into 3 sections:
+
+
+
+Find
+Here you may enter the text you wish to search for. See
+ for more information on the options provided here.
+
+
+
+
+Replace
+
+Here you may enter the text you wish to replace the found text with.
+
+You can reuse the found text in the replacement text by selecting the
+Use placeholders checkbox. Placeholders, sometimes known as
+backreferences, are a special character sequence that will be replaced with all
+or part of the found text. For instance, \0 represents the
+entire found string.
+ You may insert placeholders into the text box by clicking the
+Insert Placeholder button, then selecting an option from
+the menu like Complete Match. For example, if you are
+searching for message, and you want to replace it with
+messages insert the Complete Match
+placeholder and add an s. The replace field will then
+contain \0s.
+
+If &kate; is installed, you can learn more about placeholders in the
+Regular Expressions appendix
+of its documentation.
+
+
+
+
+Options
+This contains all the same options that the
+Find function does, with one addition:
+If the Prompt on replace option is checked a window
+will appear on every found word, allowing you to confirm whether you would like
+to replace the found text.
+
+
+
+
+
+Applications which use the &kde; text editor component show a search and replace bar instead of the Replace window. See &kwrite; documentation for additional information on the search and replace bar.
+
+
+The search and replace bar.
+
+
+The search and replace bar.
+
Replacing kmail with
+kate in &kate;'s search and replace bar
+
+
+
+
+
+
+Thanks and Acknowledgments
+Thanks to an anonymous Google Code-In 2011 participant for writing much
+of this section.
+
+
+
+
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+Choosing Fonts
+
+The font selector appears in many different &kde; applications. It lets
+you select the font face, font style, and font size of the text that appears in
+your application.
+
+
+The Font Selector
+
+
+The font selector.
+
Selecting a font in
+&systemsettings;.
+
+
+
+
+
+
+Font
+This is the leftmost selection box, and lets you choose the
+font face from a list of fonts on your system.
+
+
+
+Font style
+
+This is the center selection box, and lets you choose the font style from
+the following choices:
+
+
+Italic - this displays text in a cursive,
+or slanted fashion, and is commonly used for citations or to emphasize text.
+
+
+Regular - the default. Text is displayed
+without any special appearance.
+
+Bold Italic - a combination of both
+Bold and Italic
+
+Bold - this displays text in a darker,
+thicker fashion, and is commonly used for titles of documents or to emphasize
+text.
+
+
+
+
+
+
+Size
+This is the rightmost selection box, and lets you select the
+size of your text. Font size is measured in points, a
+standard unit of measure in typography. For more information on this, see
+the Point
+(typography) article on Wikipedia.
+
+
+
+Preview
+The bottom of the font selector displays a preview of text using
+the font settings that are currently selected. You may change this text if you
+wish.
+
+
+
+
+
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+Choosing Colors
+
+The color chooser appears in many &kde; applications, whenever you need
+ to select a color. It lets you pick from a palette consisting of many
+predefined colors or mix your own when you want a specific color.
+
+
+The Color Selector
+
+
+The color selector.
+
Selecting a color in
+&systemsettings;.
+
+
+
+
+Using Palettes
+
+A palette is a set of predefined colors. You can find it on the right
+side of the color chooser window.
+
+To select a color from a palette, simply click on it. The color will be
+displayed below the palette, along with its &HTML; hexadecimal code and name, if
+any.
+
+To switch between them, use the drop down box above the color palette.
+Most palettes will display a grid consisting of the colors, except for the
+Named Colors, which lets you select from a list of names.
+Other special palettes include * Recent Colors *, which
+will display colors that you have recently selected, and
+* Custom Colors *, which will display custom colors that
+you have saved. For more information on setting custom colors, see
+
+
+
+
+
+Mixing Colors
+
+The color chooser also lets you mix your own colors. There are several
+ways to do this:
+
+
+Using the Grid
+
+The left side of the color chooser contains a large box, and a thinner box
+immediately to its right. You can use the left box to select the Hue and
+Saturation of the desired color based on the visual guide provided in the box.
+The right bar adjusts the Value. Adjust these to select the desired color,
+which is displayed in the lower-right corner of the window.
+
+For more information on Hue, Saturation, and Value, see
+
+
+
+
+
+Using the Eyedropper
+
+The eyedropper tool allows you to select a color from your screen. To use
+it, select the eyedropper button to the right of the
+Add to Custom Colors button, and then click anywhere on
+your screen to select that color.
+
+
+
+
+Hue/Saturation/Value
+
+The lower-left corner of the screen allows you to manually enter the
+coordinates of the desired color in the Hue/Saturation/Value
+(HSV) color space. For more information on this, see
+the HSL and
+HSV article on Wikipedia.
+
+These values are also updated when selecting a color by other methods,
+so they always accurately represent the currently selected color.
+
+
+
+
+Red/Green/Blue
+
+The lower-left corner of the screen also allows you to manually enter the
+coordinates of the desired color in the Red/Green/Blue (RGB)
+color model. For more information on this, see
+the RGB color
+model article on Wikipedia.
+
+These values are also updated when selecting a color by other methods,
+so they always accurately represent the currently selected color.
+
+
+
+
+&HTML; Hexadecimal Code
+
+You may enter the &HTML; hexadecimal code representing
+the color in the lower-right corner of the screen. For more information on this,
+see the Web
+colors article on Wikipedia.
+
+This value is also updated when selecting a color by other methods,
+so it always accurately represents the currently selected color.
+
+
+
+
+
+Saving Custom Colors
+
+After selecting a color, you may save it to the Custom Colors palette so
+you can find it later. To do so, click the
+Add to Custom Colors button. You can then find it by
+selecting the * Custom Colors * palette from the drop
+down box in the upper-right corner of the screen. For more information on using
+palettes, see .
+
+
+
+
+
+
diff --git a/doc/fundamentals/toolbars-configure.png b/doc/fundamentals/toolbars-configure.png
new file mode 100644
index 00000000..52ff11c1
Binary files /dev/null and b/doc/fundamentals/toolbars-configure.png differ
diff --git a/doc/fundamentals/toolbars-toolbar.png b/doc/fundamentals/toolbars-toolbar.png
new file mode 100644
index 00000000..a204b1b6
Binary files /dev/null and b/doc/fundamentals/toolbars-toolbar.png differ
diff --git a/doc/fundamentals/ui.docbook b/doc/fundamentals/ui.docbook
new file mode 100644
index 00000000..6c91d31f
--- /dev/null
+++ b/doc/fundamentals/ui.docbook
@@ -0,0 +1,1983 @@
+
+
+
+Finding Your Way Around
+
+
+
+
+ClausChristensen
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+
+A Visual Dictionary
+
+The &plasma-workspaces; feature many different graphical user interface
+elements, commonly known as widgets. This guide will introduce
+you to their names and functions.
+
+
+The Big Picture
+
+
+Windows
+
+
+A Window
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This is the window of the &kwrite;, a text editor. Click on
+part of the window to learn more about it.
+
+
+
+
+The Window Menu
+
+
+
+A Button to place this window on all
+desktops
+
+
+
+The Titlebar
+
+
+
+Buttons to minimize, maximize, or
+close the window
+
+
+
+The Menubar
+
+
+
+The Toolbar
+
+
+
+A very large
+Text Area
+that acts as this program's
+Central Widget
+
+
+
+A vertical Scrollbar
+(there is also a horizontal scrollbar below the text box)
+
+
+
+The Statusbar
+
+
+
+
+
+Another Window
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This is the another window, that of the &dolphin; file manager. Click on
+part of the window to learn more about it.
+
+
+
+
+A panel
+that contains a list of Places on the computer system
+
+
+
+A Breadcrumb
+of the path of the displayed folder
+
+
+
+A folder Icon
+
+
+
+A file Icon
+
+
+
+A highlighted Icon
+
+
+
+A Context Menu
+listing actions that can be performed on a file
+
+
+
+A Slider
+that changes the size of the Icons
+displayed
+
+
+
+More Panels
+
+
+
+
+
+
+
+&GUI; Elements
+
+
+Some &GUI; Elements
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This screenshot, from the &systemsettings; Country/Region & Language panel,
+shows some &GUI; elements. Click on part of the window to learn more about it.
+
+
+
+
+An Icon List
+(the first item is selected)
+
+
+
+Some Tabs
+
+
+
+An open
+Drop Down Box
+
+
+
+A Button
+that resets the Drop Down Box to
+its default value
+
+
+
+An item in the Drop Down Box that
+has been selected
+
+
+
+
+Some more Buttons
+
+
+
+
+
+Some More &GUI; Elements
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This screenshot, from the &systemsettings; Custom Shortcuts panel,
+shows some more &GUI; elements.
+
+
+
+
+A Tree View
+
+
+
+A Check Box
+that has been selected
+
+
+
+A pair of Spin Boxes
+
+
+
+A Menu Button
+
+
+
+
+
+Even More &GUI; Elements
+
+
+
+
+
+
+
+
+
+
+
+
+
+This screenshot, from the &systemsettings; Default Applications panel,
+shows even more &GUI; elements. Click on part of the window to learn more about
+it.
+
+
+
+
+A List Box
+
+
+
+A pair of Radio Buttons
+
+
+
+A Text Box
+
+
+
+
+
+Some Combo Boxes
+
+
+
+
+
+
+
+
+
+
+Finally, this screenshot, from another tab
+of the &systemsettings; Country/Region & Language panel, shows five
+Combo Boxes
+
+
+
+
+
+
+
+The Widgets
+
+
+
+
+
+
+
+
+Name
+Description
+Screenshot
+
+
+
+
+
+
+
+Central Widget
+The main area of the running application. This might be the document
+you are editing in a word processor or the board of a game like Chess.
+
+
+
+
+
+
+
+
+
+
+Button
+These can be clicked with the &LMB; to perform an action.
+
+
+
+
+
+
+
+
+
+
+Breadcrumb
+Shows the path in a hierarchical system, such as a filesystem. Click on
+any part of the path to go up in the tree to that location. Click on the arrow
+to the right of part of the path to go to another child element of that path.
+
+
+
+
+
+
+
+
+
+
+
+Check Box
+These can be clicked to select and unselect items. They are typically
+used in a list of several selections. Selected items typically display a check
+mark, whereas unselected items will have an empty box.
+
+
+
+
+
+
+
+
+
+
+Color Selector
+This allows a color to be selected for various purposes, such as changing
+the color of text. For more information, see
+
+
+
+
+
+
+
+
+
+
+Combo Box
+A combination of a
+Drop Down Box and a
+Text Box. You can select an option
+from the list, or type in the text box. Some combo boxes may automatically
+complete entries for you, or open the list with a list of choices that match
+what you have typed.
+
+
+
+
+
+
+
+
+
+
+Context Menu
+Many user interface elements in the &kde-sc; contain a context menu,
+which can be opened by clicking on something with the &RMB;. This menu contains
+options and actions that usually affect the user interface element that was
+right-clicked.
+
+
+
+
+
+
+
+
+
+
+Dialog Box
+A small window that appears above a larger application window. It may
+contain a message, warning, or configuration panel, among others.
+
+
+
+
+
+
+
+
+
+
+Drop Down Box
+This provides a list of items, from which you may select one.
+
+
+
+
+
+
+
+
+
+
+Icon
+A graphical representation of something, such as a file or action. They
+typically, but not always, also contain a text description, either beneath or
+to the right of the icon.
+
+
+
+
+
+
+
+
+
+
+Icon List
+This provides a list of items represented by an
+Icon and a description. It is typically
+used in the left panel of configuration panels to allow selection from various
+types of configuration categories.
+
+
+
+
+
+
+
+
+
+
+List Box
+This is a list of items that typically allows multiple items to be
+selected. To select a group of contiguous items, press the &Shift; key and
+click the first and last items. To select multiple items that are not
+contiguous, press the &Ctrl; key and select the desired items.
+
+
+
+
+
+
+
+
+
+
+Menu
+A list of selections, that usually perform an action, set an option, or
+opens a window. These can be opened from
+menubars or
+menu buttons.
+
+
+
+
+
+
+
+
+
+
+Menubar
+These are located at the top of nearly every window and provide access
+to all the functions of the running application. For more information, see
+.
+
+
+
+
+
+
+
+
+
+
+Menu Button
+A special type of button that
+opens a menu.
+
+
+
+
+
+
+
+
+
+
+Panel or Sidebar or Tool View
+These are located on the sides or bottom of the
+central widget and allow
+you to perform many different tasks in an application. A text editor might
+provide a list of open documents in one, while a word processor might allow you
+to select a clip art image.
+
+
+
+
+
+
+
+
+
+
+Progress Bar
+A small bar that indicates that a long-running operation is being
+performed. The bar may indicate how much of the operation has completed, or it
+may simply bounce back and forth to indicate that the operation is in progress.
+
+
+
+
+
+
+
+
+
+
+
+Radio Button
+These are used in a list of options, and only permit one of the options in
+the list to be selected.
+
+
+
+
+
+
+
+
+
+
+Scrollbar
+Allows you to navigate a document.
+
+
+
+
+
+
+
+
+
+
+Slider
+Allows a numeric value to be selected by moving a small bar either
+horizontally or vertically across a line.
+
+
+
+
+
+
+
+
+
+
+Spin Box
+This permits a numerical value to be selected, either by using the up and
+down arrows to the right of the box to raise or lower the value, respectively,
+or by typing the value into the
+text box.
+
+
+
+
+
+
+
+
+
+
+Status Bar
+These are located at the bottom of many applications and display
+information about what the application is currently doing. For instance, a web
+browser might indicate the progress of loading a web page, while a
+word processor might display the current word count.
+
+
+
+
+
+
+
+
+
+
+Tab
+These appear at the top of an area of a window, and permit that area of
+the window to be changed to a variety of different selections.
+
+
+
+
+
+
+
+
+
+
+Text Area
+Allows a large amount of text to be typed in, typically multiple lines or
+paragraphs. Unlike a Text Box,
+pressing &Enter; will usually result in a line break.
+
+
+
+
+
+
+
+
+
+
+
+Text Box
+A single-line text entry that allows a small amount of text to be typed
+in. Typically, pressing &Enter; will perform the same action as clicking the
+OK button.
+
+
+
+
+
+
+
+
+
+
+Titlebar
+This is located at the top of every window. It contains the name of the
+application and usually information about what the application is doing, like
+the title of the web page being viewed in a web browser or the filename of a
+document open in a word processor.
+
+
+
+
+
+
+
+
+
+
+Toolbar
+These are located near the top of many applications, typically directly
+underneath the menu bar. They
+provide access to many common functions of the running application, like
+Save or Print.
+
+
+
+
+
+
+
+
+
+
+Tree View
+A Tree View allows you to select from a hierarchical list of options. A
+section, or category, of the Tree View may be unexpanded, in which case no
+options will appear beneath it and the arrow to the left of the title will be
+pointing right, toward the title. It may also be expanded, in which case several
+options will be listed below it, and the arrow to the left of the title will be
+pointing down, toward the options. To expand a portion of the tree view, click
+the arrow to the left of the title of the section you wish to expand,
+double-click on the title, or select the title using your keyboard's arrow keys
+and press the &Enter; or + key. To minimize a portion of the
+tree view, you may also click the arrow, double-click on the title, or press the
+&Enter; or - key.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+
+Common Menus
+
+Many &kde; applications contain these menus. However, most
+applications will have more menu entries than those listed here, and others may
+be missing some of the entries listed here.
+
+
+A Menu Bar
+
+
+A menubar
+
The menubar in
+&gwenview;.
+
+
+
+
+Some applications, like &dolphin;, do not show a menubar by default. You
+can show it by pressing &Ctrl;M. You can
+also use this to hide the menubar in applications that support doing so.
+
+
+The File Menu
+The File menu allows you to perform operations on the
+currently open file and access common tasks in applications.
+
+Common menu items include:
+
+
+
+
+
+&Ctrl;N
+FileNew
+
+
+Creates a new file.
+
+
+
+
+
+FileNew Window
+
+
+Opens a new window.
+
+
+
+
+
+&Ctrl;O
+FileOpen...
+
+
+Opens an already existing file.
+
+
+
+
+
+&Ctrl;S
+FileSave
+
+
+Saves the file. If the file already exists it will be overwritten.
+
+
+
+
+
+FileSave As...
+
+
+ Saves the file with a new filename.
+
+
+
+
+
+
+FileSave All
+
+
+Saves all open files.
+
+
+
+
+
+F5
+FileReload
+
+
+Reloads the current file.
+
+
+
+
+
+FileReload All
+
+
+Reloads all open files.
+
+
+
+
+
+&Ctrl;P
+FilePrint...
+
+
+Prints the file.
+
+
+
+
+
+&Ctrl;W
+FileClose
+
+
+Closes the current file.
+
+
+
+
+
+FileClose All
+
+
+Closes all open files.
+
+
+
+
+
+&Ctrl;Q
+FileQuit
+
+
+Exits the program.
+
+
+
+
+
+
+
+The Edit Menu
+The Edit menu allows you to modify the currently
+open file.
+
+
+
+
+
+&Ctrl;Z
+EditUndo
+
+
+Undo the last action you performed in the file.
+
+
+
+
+
+&Ctrl;&Shift;Z
+EditRedo
+
+
+Redo the last action you performed in the file.
+
+
+
+
+
+&Ctrl;X
+EditCut
+
+
+Removes the currently selected portion of the file, if any, and places a copy of
+it in the clipboard buffer.
+
+
+
+
+
+&Ctrl;C
+EditCopy
+
+
+Places a copy of the currently selected portion of the file, if any, in the
+clipboard buffer.
+
+
+
+
+
+&Ctrl;V
+EditPaste
+
+
+Copies the first item in the clipboard buffer to the current location in the
+file, if any.
+
+
+
+
+
+&Ctrl;A
+EditSelect All
+
+
+Selects the entire contents of the currently open file.
+
+
+
+
+
+&Ctrl;F
+EditFind...
+
+
+Allows you to search for text in the currently open file.
+
+
+
+
+
+&Ctrl;R
+EditReplace...
+
+
+Allows you to search for text in the currently open file and replace it with
+something else.
+
+
+
+
+
+F3
+EditFind Next
+
+
+Go to the next match of the last Find operation.
+
+
+
+
+
+&Shift;F3
+EditFind Previous
+
+
+Go to the previous match of the last Find operation.
+
+
+
+
+
+
+
+The View Menu
+The View menu allows you to change the layout of the
+currently open file and/or the running application.
+
+This menu has different options depending on the application you are
+using.
+
+
+
+The Tools Menu
+The Tools menu allows you to perform certain actions
+on the currently open file.
+
+
+
+
+
+&Ctrl;&Shift;O
+ToolsAutomatic Spell Checking
+
+
+Check for spelling errors as you type. For more information, see
+.
+
+
+
+
+
+ToolsSpelling...
+
+
+This initiates the spellchecking program - a program designed to help the user
+catch and correct any spelling errors. For more information, see
+.
+
+
+
+
+
+ToolsSpelling (from cursor)...
+
+
+This initiates the spellchecking program, but only checks the portion of the
+document from the current location of the cursor to the end. For more information,
+see .
+
+
+
+
+
+ToolsSpellcheck Selection...
+
+
+This initiates the spellchecking program, but only checks the currently selected
+text in the document. For more information, see .
+
+
+
+
+
+ToolsChange Dictionary...
+
+
+This allows you to change the dictionary used to check spellings. For more
+information, see .
+
+
+
+
+
+
+
+
+The Settings Menu
+The Settings allows you to customize the application.
+
+This menu typically contains the following items:
+
+
+
+
+
+&Ctrl;M
+
+Settings
+Show Menubar
+
+Hides and shows the menubar.
+
+
+
+
+Settings
+Show Statusbar
+
+
+
+Toggles the display of the statusbar on and off. Some &kde; applications use statusbar at the bottom of their screen to display useful information.
+
+
+
+
+
+
+SettingsToolbars Shown
+
+
+Allows you to show and hide the various toolbars supported by the application.
+
+
+
+
+
+SettingsConfigure Shortcuts...
+
+
+Allows you to enable, disable, and modify keyboard shortcuts. For more
+information, see .
+
+
+
+
+
+SettingsConfigure Toolbars...
+
+
+Allows you to customize the contents, layout, text, and icons of toolbars. For
+more information, see .
+
+
+
+
+SettingsConfigure
+Notifications...
+This item displays a standard &kde; notifications configuration
+dialog, where you can change the notifications (sounds, visible messages,
+&etc;) used by the application.
+For more information how to configure notifications please read the documentation for
+the &systemsettings; module Manage Notifications.
+
+
+
+
+
+
+SettingsConfigure Application...
+
+
+Opens the configuration panel for the currently running application.
+
+
+
+
+
+
+
+The Help Menu
+The Help menu gives you access to the application's
+documentation and other useful resources.
+
+
+
+
+
+
+
+F1
+
+Help
+Application Handbook
+
+
+Invokes the KDE Help system starting at the
+running application's handbook.
+
+
+
+
+
+&Shift;F1
+
+Help
+What's This?
+
+
+Changes the mouse cursor to a combination arrow and
+question mark. Clicking on items within the application; will open a help
+window (if one exists for the particular item) explaining the item's
+function.
+
+
+
+
+
+Help
+Report Bug...
+
+Opens the Bug report dialog where you can
+report a bug or request a wishlist feature.
+
+
+
+
+Help
+Switch Application Language...
+
+Opens a dialog where you can
+edit the Primary language and Fallback language
+for this application.
+
+
+
+
+Help
+About Application
+
+This will display version and author
+information for the running application.
+
+
+
+
+Help
+About KDE
+
+This displays the &kde; Development Platform version
+and other basic information.
+
+
+
+
+
+
+Thanks and Acknowledgments
+
+Special thanks to an anonymous Google Code-In 2011 participant for writing
+much of this documentation.
+
+
+
+
+
+
+
+
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+
+Common Keyboard Shortcuts
+
+The &plasma-workspaces; provide keyboard shortcuts that allow you to
+perform many tasks without touching your mouse. If you use your keyboard
+frequently, using these can save you lots of time.
+
+This list contains the most common shortcuts supported by the workspace
+itself and many applications available within. Every application also provides
+its own shortcuts, so be sure to check their manuals for a comprehensive
+listing.
+
+
+The Meta key described below is a generic name for
+the custom key found on many different keyboards. On keyboards
+designed for &Microsoft; &Windows;, this key is usually called the
+Windows key, and will have a picture of the &Windows;
+logo. On keyboards designed for &Mac; computers, this key is known as
+the Command key and will have a picture of the
+Apple logo and/or the
+⌘ symbol. On keyboards designed for &UNIX; systems, this key
+is really known as the Meta key and is typically labeled with a
+diamond: ◆.
+
+
+
+Working with Windows
+
+These shortcuts allow you to perform all kinds of operations with windows,
+whether it be opening, closing, moving, or switching between them.
+
+
+Starting and Stopping Applications
+
+These shortcuts make it easy to start and stop programs.
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+&Ctrl;Q
+Quit
+
+
+
+&Ctrl;Esc
+System Activity
+
+
+
+&Ctrl;&Alt;&Esc;
+Force Quit
+
+
+
+&Alt;F2
+Run Command Interface
+
+
+
+&Alt;F4
+Close
+
+
+
+
+
+
+
+
+Moving Around
+
+These shortcuts allow you to navigate between windows, activities, and
+desktops efficiently.
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+&Ctrl;F10
+Present Windows
+
+
+
+&Ctrl;F9
+Present Windows on current desktop
+
+
+
+&Ctrl;F7
+Present Windows of current application only
+
+
+
+&Ctrl;F11
+Desktop Cube
+
+
+
+&Ctrl;F12
+Show Dashboard
+
+
+
+&Ctrl;&Alt;A
+Activate Window Demanding Attention
+
+
+
+&Alt;	
+Walk through windows
+
+
+
+&Alt;`
+Walk through windows of the current application
+
+
+
+&Alt;F3
+Open the Window Operations menu
+
+
+
+&Meta;&Alt;Up
+Switch to Window Above
+
+
+
+&Meta;&Alt;Down
+Switch to Window Below
+
+
+
+&Meta;&Alt;Left
+Switch to Window to the Left
+
+
+
+&Meta;&Alt;Right
+Switch to Window to the Right
+
+
+
+
+
+
+
+
+Panning and Zooming
+
+Need to get a closer look? The &plasma-workspaces; allow you to zoom in
+and out and move your entire desktop around, so you can zoom in even when the
+application you are using doesn't support it.
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+
+
+&Meta;=
+Zoom In
+
+
+
+&Meta;-
+Zoom Out
+
+
+
+&Meta;0
+Zoom Normal
+
+
+
+&Meta;Up
+Pan Up
+
+
+
+&Meta;Down
+Pan Down
+
+
+
+&Meta;Left
+Pan left
+
+
+
+&Meta;Right
+Pan Right
+
+
+
+
+
+
+
+
+
+Working with Activities and Virtual Desktops
+
+These shortcuts allow you to switch between and manage
+Activities
+and virtual desktops.
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+&Ctrl;Q
+View all your Activities
+
+
+
+&Meta;	
+Next Activity
+
+
+
+&Meta;&Shift;	
+Previous Activity
+
+
+
+
+ &Alt;D
+ R
+
+Remove this Activity
+
+
+
+
+ &Alt;D
+ S
+
+Activities Settings
+
+
+
+&Ctrl;F1
+Switch to Desktop 1
+
+
+
+&Ctrl;F2
+Switch to Desktop 2
+
+
+
+&Ctrl;F3
+Switch to Desktop 3
+
+
+
+&Ctrl;F4
+Switch to Desktop 4
+
+
+
+
+
+
+
+
+Working with the Desktop
+
+These shortcuts allow you to work with the &plasma-desktop; and panels.
+
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+
+ &Alt;D
+ A
+
+Add Widgets
+
+
+
+
+ &Alt;D
+ R
+
+Remove Widgets
+
+
+
+
+ &Alt;D
+ L
+
+Lock/Unlock Widgets
+
+
+
+
+ &Alt;D
+ N
+
+Next Widget
+
+
+
+
+ &Alt;D
+ P
+
+Previous Widget
+
+
+
+
+ &Alt;D
+ S
+
+Widget Settings
+
+
+
+&Ctrl;F12
+Show Dashboard
+
+
+
+
+ &Alt;D
+ T
+
+Run the Associated Application
+
+
+
+&Alt;&Shift;F12
+Enable/Disable Desktop Effects
+
+
+
+
+
+
+
+
+Getting Help
+
+Need some help? The manual for the current application is only a keypress
+away, and some programs even have additional help that explains the element in
+focus.
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+F1
+Help
+
+
+
+&Shift;F1
+What's This?
+
+
+
+
+
+
+
+
+Working with Documents
+
+Whether it's a text document, spreadsheet, or web site, these shortcuts
+make performing many kinds of tasks with them easy.
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+F5
+Refresh
+
+
+
+&Ctrl;A
+Select All
+
+
+
+&Ctrl;Z
+Undo
+
+
+
+&Ctrl;&Shift;Z
+Redo
+
+
+
+&Ctrl;X
+Cut
+
+
+
+&Ctrl;C
+Copy
+
+
+
+&Ctrl;V
+Paste
+
+
+
+&Ctrl;N
+New
+
+
+
+&Ctrl;P
+Print
+
+
+
+
+&Ctrl;S
+Save
+
+
+
+
+&Ctrl;F
+Find
+
+
+
+
+&Ctrl;W
+Close Document/Tab
+
+
+
+
+
+
+
+
+Working with Files
+
+Whether your in an Open/Save dialog or the &dolphin; file manager, these
+shortcuts save you time when performing operations on files. Note that some of
+the concepts used with files are the same as with documents, so several of the
+shortcuts are identical to their counterparts listed above.
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+&Ctrl;Z
+Undo
+
+
+
+&Ctrl;X
+Cut
+
+
+
+&Ctrl;C
+Copy
+
+
+
+&Ctrl;V
+Paste
+
+
+
+&Ctrl;A
+Select All
+
+
+
+&Ctrl;L
+Replace Location
+
+
+
+&Ctrl;&Shift;A
+Invert Selection
+
+
+
+&Alt;Left
+Back
+
+
+
+&Alt;Right
+Forward
+
+
+
+&Alt;Up
+Up (to folder that contains this one)
+
+
+
+&Alt;Home
+Home Folder
+
+
+
+Delete
+Move to Trash
+
+
+
+&Shift;Delete
+Delete Permanently
+
+
+
+
+
+
+
+
+Changing Volume and Brightness
+
+In addition to the standard keys, many computer keyboards and laptops
+nowadays have special keys or buttons to change the speaker volume, as well as
+the brightness of your monitor if applicable. If present, you can use these
+keys in the &plasma-workspaces; to perform those tasks.
+
+If you do not have such keys, see for
+information on how to assign keys for these tasks.
+
+
+
+
+Leaving Your Computer
+
+All done? Use these shortcuts and put your computer away!
+
+
+
+
+
+
+Shortcut
+Description
+
+
+
+
+
+
+&Ctrl;&Alt;Insert
+Switch User
+
+
+
+&Ctrl;&Alt;L
+Lock Session
+
+
+
+&Ctrl;&Alt;Delete
+Logout
+
+
+
+&Ctrl;&Alt;&Shift;Delete
+Logout without confirmation
+
+
+
+&Ctrl;&Alt;&Shift;Page Down
+Shut Down without confirmation
+
+
+
+&Ctrl;&Alt;&Shift;Page Up
+Reboot without confirmation
+
+
+
+
+
+
+
+
+Modifying Shortcuts
+
+The shortcuts described in Working With
+Windows, Leaving Your Computer, and
+Changing Volume and Brightness are called
+global shortcuts, since they work regardless of which
+window you have open on your screen. These can be modified in the
+Global Shortcuts panel of
+&systemsettings;, where they are separated by &kde; component.
+
+The shortcuts described in Working with
+Activities and Virtual Desktops and Working
+with the Desktop can be modified by clicking on the
+Desktop Toolbox and
+selecting Shortcut Settings.
+
+The shortcuts described in Working with
+Documents and Getting Help are set by
+individual programs. Most &kde; programs allow you to use the
+common shortcut editing dialog to modify these.
+The shortcuts described in Working With Files
+can be edited in the same manner when used inside a file manager like &dolphin;
+or &konqueror;, but cannot be modified in the case of Open/Save dialogs, &etc;
+
+
+
+
+
+
diff --git a/doc/fundamentals/visualdict-breadcrumb.png b/doc/fundamentals/visualdict-breadcrumb.png
new file mode 100644
index 00000000..e2a8db5b
Binary files /dev/null and b/doc/fundamentals/visualdict-breadcrumb.png differ
diff --git a/doc/fundamentals/visualdict-button.png b/doc/fundamentals/visualdict-button.png
new file mode 100644
index 00000000..845c4940
Binary files /dev/null and b/doc/fundamentals/visualdict-button.png differ
diff --git a/doc/fundamentals/visualdict-central-widget.png b/doc/fundamentals/visualdict-central-widget.png
new file mode 100644
index 00000000..b8305a7c
Binary files /dev/null and b/doc/fundamentals/visualdict-central-widget.png differ
diff --git a/doc/fundamentals/visualdict-check-box.png b/doc/fundamentals/visualdict-check-box.png
new file mode 100644
index 00000000..32046468
Binary files /dev/null and b/doc/fundamentals/visualdict-check-box.png differ
diff --git a/doc/fundamentals/visualdict-color-selector.png b/doc/fundamentals/visualdict-color-selector.png
new file mode 100644
index 00000000..7d19b369
Binary files /dev/null and b/doc/fundamentals/visualdict-color-selector.png differ
diff --git a/doc/fundamentals/visualdict-combo-box.png b/doc/fundamentals/visualdict-combo-box.png
new file mode 100644
index 00000000..2b4c3d76
Binary files /dev/null and b/doc/fundamentals/visualdict-combo-box.png differ
diff --git a/doc/fundamentals/visualdict-context-menu.png b/doc/fundamentals/visualdict-context-menu.png
new file mode 100644
index 00000000..0bbac64e
Binary files /dev/null and b/doc/fundamentals/visualdict-context-menu.png differ
diff --git a/doc/fundamentals/visualdict-dialog-box.png b/doc/fundamentals/visualdict-dialog-box.png
new file mode 100644
index 00000000..87ef8beb
Binary files /dev/null and b/doc/fundamentals/visualdict-dialog-box.png differ
diff --git a/doc/fundamentals/visualdict-drop-down-box.png b/doc/fundamentals/visualdict-drop-down-box.png
new file mode 100644
index 00000000..42bb4319
Binary files /dev/null and b/doc/fundamentals/visualdict-drop-down-box.png differ
diff --git a/doc/fundamentals/visualdict-gui1.png b/doc/fundamentals/visualdict-gui1.png
new file mode 100644
index 00000000..17b2a7a1
Binary files /dev/null and b/doc/fundamentals/visualdict-gui1.png differ
diff --git a/doc/fundamentals/visualdict-gui2.png b/doc/fundamentals/visualdict-gui2.png
new file mode 100644
index 00000000..5c2df0af
Binary files /dev/null and b/doc/fundamentals/visualdict-gui2.png differ
diff --git a/doc/fundamentals/visualdict-gui3.png b/doc/fundamentals/visualdict-gui3.png
new file mode 100644
index 00000000..c8aafcef
Binary files /dev/null and b/doc/fundamentals/visualdict-gui3.png differ
diff --git a/doc/fundamentals/visualdict-gui4.png b/doc/fundamentals/visualdict-gui4.png
new file mode 100644
index 00000000..9e763a42
Binary files /dev/null and b/doc/fundamentals/visualdict-gui4.png differ
diff --git a/doc/fundamentals/visualdict-icon-list.png b/doc/fundamentals/visualdict-icon-list.png
new file mode 100644
index 00000000..89f40cad
Binary files /dev/null and b/doc/fundamentals/visualdict-icon-list.png differ
diff --git a/doc/fundamentals/visualdict-icon.png b/doc/fundamentals/visualdict-icon.png
new file mode 100644
index 00000000..be294b73
Binary files /dev/null and b/doc/fundamentals/visualdict-icon.png differ
diff --git a/doc/fundamentals/visualdict-list-box.png b/doc/fundamentals/visualdict-list-box.png
new file mode 100644
index 00000000..4a7e9cbc
Binary files /dev/null and b/doc/fundamentals/visualdict-list-box.png differ
diff --git a/doc/fundamentals/visualdict-menu-button.png b/doc/fundamentals/visualdict-menu-button.png
new file mode 100644
index 00000000..51d3f3e5
Binary files /dev/null and b/doc/fundamentals/visualdict-menu-button.png differ
diff --git a/doc/fundamentals/visualdict-menu.png b/doc/fundamentals/visualdict-menu.png
new file mode 100644
index 00000000..7e235946
Binary files /dev/null and b/doc/fundamentals/visualdict-menu.png differ
diff --git a/doc/fundamentals/visualdict-menubar.png b/doc/fundamentals/visualdict-menubar.png
new file mode 100644
index 00000000..768dfd69
Binary files /dev/null and b/doc/fundamentals/visualdict-menubar.png differ
diff --git a/doc/fundamentals/visualdict-panel.png b/doc/fundamentals/visualdict-panel.png
new file mode 100644
index 00000000..a7093bc7
Binary files /dev/null and b/doc/fundamentals/visualdict-panel.png differ
diff --git a/doc/fundamentals/visualdict-progress-bar.png b/doc/fundamentals/visualdict-progress-bar.png
new file mode 100644
index 00000000..627ce6f5
Binary files /dev/null and b/doc/fundamentals/visualdict-progress-bar.png differ
diff --git a/doc/fundamentals/visualdict-radio-button.png b/doc/fundamentals/visualdict-radio-button.png
new file mode 100644
index 00000000..e350ff43
Binary files /dev/null and b/doc/fundamentals/visualdict-radio-button.png differ
diff --git a/doc/fundamentals/visualdict-scrollbar.png b/doc/fundamentals/visualdict-scrollbar.png
new file mode 100644
index 00000000..f5762983
Binary files /dev/null and b/doc/fundamentals/visualdict-scrollbar.png differ
diff --git a/doc/fundamentals/visualdict-slider.png b/doc/fundamentals/visualdict-slider.png
new file mode 100644
index 00000000..27a61159
Binary files /dev/null and b/doc/fundamentals/visualdict-slider.png differ
diff --git a/doc/fundamentals/visualdict-spin-box.png b/doc/fundamentals/visualdict-spin-box.png
new file mode 100644
index 00000000..ed1fe812
Binary files /dev/null and b/doc/fundamentals/visualdict-spin-box.png differ
diff --git a/doc/fundamentals/visualdict-statusbar.png b/doc/fundamentals/visualdict-statusbar.png
new file mode 100644
index 00000000..247dceb9
Binary files /dev/null and b/doc/fundamentals/visualdict-statusbar.png differ
diff --git a/doc/fundamentals/visualdict-tab.png b/doc/fundamentals/visualdict-tab.png
new file mode 100644
index 00000000..cf269029
Binary files /dev/null and b/doc/fundamentals/visualdict-tab.png differ
diff --git a/doc/fundamentals/visualdict-text-area.png b/doc/fundamentals/visualdict-text-area.png
new file mode 100644
index 00000000..29b66a95
Binary files /dev/null and b/doc/fundamentals/visualdict-text-area.png differ
diff --git a/doc/fundamentals/visualdict-text-box.png b/doc/fundamentals/visualdict-text-box.png
new file mode 100644
index 00000000..3b2ce3cc
Binary files /dev/null and b/doc/fundamentals/visualdict-text-box.png differ
diff --git a/doc/fundamentals/visualdict-titlebar.png b/doc/fundamentals/visualdict-titlebar.png
new file mode 100644
index 00000000..46a1dc1f
Binary files /dev/null and b/doc/fundamentals/visualdict-titlebar.png differ
diff --git a/doc/fundamentals/visualdict-toolbar.png b/doc/fundamentals/visualdict-toolbar.png
new file mode 100644
index 00000000..319332ce
Binary files /dev/null and b/doc/fundamentals/visualdict-toolbar.png differ
diff --git a/doc/fundamentals/visualdict-tree-view.png b/doc/fundamentals/visualdict-tree-view.png
new file mode 100644
index 00000000..4c8722e7
Binary files /dev/null and b/doc/fundamentals/visualdict-tree-view.png differ
diff --git a/doc/fundamentals/visualdict-window.png b/doc/fundamentals/visualdict-window.png
new file mode 100644
index 00000000..e618521b
Binary files /dev/null and b/doc/fundamentals/visualdict-window.png differ
diff --git a/doc/fundamentals/visualdict-window2.png b/doc/fundamentals/visualdict-window2.png
new file mode 100644
index 00000000..1afa2376
Binary files /dev/null and b/doc/fundamentals/visualdict-window2.png differ
diff --git a/doc/glossary/CMakeLists.txt b/doc/glossary/CMakeLists.txt
new file mode 100644
index 00000000..18cd3d05
--- /dev/null
+++ b/doc/glossary/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR khelpcenter/glossary)
diff --git a/doc/glossary/checkxrefs b/doc/glossary/checkxrefs
new file mode 100755
index 00000000..0805ec6b
--- /dev/null
+++ b/doc/glossary/checkxrefs
@@ -0,0 +1,10 @@
+#!/bin/sh
+DEFINED_ENTRIES=`sed -ne "s^.*.*^\1^p" *.docbook`
+REFERENCED_ENTRIES=`sed -ne "s^.*.*^\1^p" *.docbook | uniq`
+
+# Check for entries which are referenced but not defined.
+for ENTRY in $REFERENCED_ENTRIES; do
+ if ! echo $DEFINED_ENTRIES | grep $ENTRY - > /dev/null 2>&1; then
+ echo "'$ENTRY' referenced but not defined!"
+ fi
+done
diff --git a/doc/glossary/index.docbook b/doc/glossary/index.docbook
new file mode 100644
index 00000000..5f31f04a
--- /dev/null
+++ b/doc/glossary/index.docbook
@@ -0,0 +1,611 @@
+
+
+
+
+
+
+
+
+
+
+
+
+]>
+
+
+
+
+
+ Technologies
+
+ Akonadi
+ The data storage access mechanism for all PIM (Personal Information Manager) data in &kde; SC 4. One single
+ storage and retrieval system allows efficiency and extensibility not possible under &kde; 3, where each PIM component had
+ its own system. Note that use of Akonadi does not change data storage formats (vcard, iCalendar, mbox, maildir etc.) - it
+ just provides a new way of accessing and updating the data.&newpara;
+ The main reasons for design and development of Akonadi are of technical nature, ⪚ having a unique way to access PIM-data (contacts, calendars, emails..) from different applications (⪚ &kmail;, &kword; &etc;), thus eliminating the need to write similar code here and there.&newpara;
+ Another goal is to de-couple GUI applications like &kmail; from the direct access to external resources like mail-servers - which was a major reason for bug-reports/wishes with regard to performance/responsiveness in the past.&newpara;
+ More info:&newpara;
+ &linkstart;"http://pim.kde.org/akonadi/"&linkmid;Akonadi for KDE's PIM&linkend;&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Akonadi"&linkmid;Wikipedia: Akonadi&linkend;&newpara;
+ &linkstart;"http://techbase.kde.org/Projects/PIM/Akonadi"&linkmid;Techbase - Akonadi&linkend;
+ &GUI;
+ &kde;
+
+
+
+ ARts
+ The sound framework in &kde; 2 and 3. Its single-tasking nature caused problems when two sources of sound were encountered. In the &plasma; desktop it is replaced by Phonon.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/ARts"&linkmid; Wikipedia: ARts&linkend;&newpara;
+ &linkstart;"http://www.arts-project.org"&linkmid;ARts home page&linkend;
+ &kde;
+ Phonon
+ &plasma;
+
+
+
+ D-Bus
+ D-Bus or Desktop Bus is an inter-service messaging system. Developed by &RedHat;, it was heavily influenced by &kde; 3 DCOP, which it supersedes. Most POSIX operating systems support D-Bus, and a port for Windows exists. It is used by Qt 4 and GNOME.&newpara;
+ More info:&newpara;
+ &linkstart;"http://freedesktop.org/wiki/Software/dbus/"&linkmid;FreeDesktop.org: What is D-Bus?&linkend;&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/D-Bus"&linkmid;Wikipedia: D-Bus&linkend;
+ &DCOP;
+ GNOME
+ &kde;
+ &Qt;
+
+
+
+ DCOP
+ DCOP, which stands for Desktop COmmunication Protocol, is a light-weight interprocess and software componentry communication system used in &kde; 3. Replaced with &DBus; in &kde; SC 4.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/DCOP"&linkmid;Wikipedia: DCOP&linkend;
+ D-Bus
+ &kde;
+
+
+
+ Flake
+ Flake is a programming library to be used in &koffice;/Calligra. Functionally, it provides Shapes to display content and Tools to manipulate content. Shapes can be zoomed or rotated and can be grouped to work as a single Shape, around which text flow is possible.&newpara;
+ More info:&newpara;
+ &linkstart;"http://community.kde.org/Calligra/Libs/Flake"&linkmid;&kde; Community Wiki: Flake&linkend;
+ &kde;
+ KParts
+
+
+
+ Get Hot New Stuff
+ &emstart;G&emend;et &emstart;H&emend;ot &emstart;N&emend;ew &emstart;S&emend;tuff (GHNS) is an open standard that makes it easy for users to download and install various extensions for their applications. Our implementation of GHNS is used by &plasma; (for example to get new desktop themes), and by many applications and widgets.&newpara;
+ More info:&newpara;
+ &linkstart;"http://ghns.freedesktop.org"&linkmid;Home of GHNS&linkend;&newpara;
+ &linkstart;"http://lwn.net/Articles/227855/"&linkmid;An article on GHNS in &kde; SC 4&linkend;
+ &kde;
+ &plasma;
+
+
+
+ GHNS
+ GHNS is the acronym of Get Hot New Stuff.
+ Get Hot New Stuff
+
+
+
+ IO Slave
+ IO Slaves enable &kde; applications to
+ access remote resources as easily as local resources (making them
+ "network transparent"). Remote resources (⪚ files) might
+ be stored on SMB shares or similar.
+ SMB
+ &kde;
+
+
+
+ KHTML
+ KHTML is the &HTML; rendering engine for the &kde; &plasma; desktop, as used by the &konqueror; browser. It also provides a KPart that enables all &kde; applications to display web content. A new introduction, &Qt; WebKit is also for Plasma and other application development.
+ &kde;
+ &konqueror;
+ KParts
+ &plasma;
+ WebKit
+
+
+
+ KIO
+ The &kde; Input/Output system which makes use of so-called
+ "IO Slaves".
+ IO
+Slave
+ &kde;
+
+
+
+ Kiosk
+ Kiosk is a framework for restricting user capabilities on a &kde; platform system, ideal for use in locked-down environments such as Internet cafés. It is present in &kde; 3 and &kde; 4, but the administration tool, Kiosktool is &kde; 3 only. It can be used to configure &kde; 4 applications, or kiosk configurations can be maintained by editing config files manually.
+ &kde;
+
+
+
+ KParts
+ KParts is an embedding technology which allows &kde;
+ applications to embed other &kde; applications. For example, the text
+ view used by &konqueror; is a KPart.
+ &konqueror;
+
+
+
+ KSycoca
+ KSycoca (&kde; &emstart;Sy&emend;stem
+ &emstart;Co&emend;nfiguration &emstart;Ca&emend;che) is a
+ configuration cache which, for example, guarantees fast access to the menu
+ entries.
+ KBuildSycoca
+
+
+
+ Phonon
+ A cross-platform multimedia API, interfacing with existing frameworks, such as gstreamer and xine engines. &kde; 2 and 3 depended on aRts for sound. Phonon replaces it.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Phonon_(KDE)"&linkmid; Wikipedia: Phonon (KDE)&linkend;&newpara;
+ &linkstart;"http://phonon.kde.org"&linkmid;Phonon website&linkend;
+ &arts;
+ &kde;
+
+
+
+ Solid
+ Solid provides a single API for hardware management. Hardware is grouped into 'domains'. Since the backends for Solid are pluggable, Solid helps application developers write less code, and have it platform independent.&newpara;
+ More info:&newpara;
+ &linkstart;"http://solid.kde.org"&linkmid;Discover Solid&linkend;
+ &kde;
+
+
+
+ Threadweaver
+ This thread programming library spreads work among multiple-core processors where available, prioritizing them before queuing them for execution. ThreadWeaver provides a high-level job interface for multithreaded programming.&newpara;
+ More info:&newpara;
+ &linkstart;"http://www.englishbreakfastnetwork.org/apidocs/apidox-kde-4.0/kdelibs-apidocs/threadweaver/html/Why.html"&linkmid;Why Multithreading?&linkend;
+ &kde;
+
+
+
+ WebKit
+ HTML rendering engine, originating from a fork of KHTML. Adopted by Apple and developed for Safari. Webkit brings the whole functionality back to &kde; SC 4, where it is available through &Qt;.&newpara;
+ More info:&newpara;
+ &linkstart;"http://webkit.org/"&linkmid;WebKit home page&linkend;&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Webkit"&linkmid;Wikipedia: WebKit&linkend;
+ &kde;
+ KHTML
+
+
+
+
+
+ X.Org
+
+ Antialiasing
+ If mentioned in context with &kde;, anti-aliasing often means
+ the smoothing of the fonts visible on the screen. &Qt; version 3.3
+ or higher used together with X.Org server makes this possible under &kde;
+ as well.
+ &kde;
+ &Qt;
+
+
+
+ &X-Server;
+ The &X-Server; represents a basic layer upon which the
+ various &GUI;s like &kde; are built. It manages the
+ basic mouse and keyboard input (from the local host as well as from
+ remote hosts) and provides elementary graphic routines to draw
+ rectangles and other primitives.
+ &kde;
+ &GUI;
+
+
+
+
+
+ Applications
+
+ Dolphin
+ The default file manager in &kde; SC 4. It has a side panel (Places), but navigation is mainly by the 'breadcrumb' trail above the main window. Split windows are possible, and views can be applied to individual windows. Mounting and unmounting USB devices can be done in the side panel. Other directories can be added to the Places panel. A Tree view is also possible.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Dolphin_(software)"&linkmid;Wikipedia: Dolphin&linkend;&newpara;
+ &linkstart;"http://introducingkde4.blogspot.com/2007/12/dolphin.html"&linkmid;Introducing KDE 4 Blog - Dolphin&linkend;&newpara;
+ &linkstart;"http://userbase.kde.org/Tutorials/File_Management"&linkmid;Userbase: File Management Tutorial&linkend;
+ &kde;
+ &konqueror;
+
+
+
+ KBuildSycoca
+ KBuildSycoca4 is a command line
+ program and regenerates the
+ so-called KSycoca. This is useful, for example, if some
+ or all modules in
+ &systemsettings; are missing.
+ KSycoca
+ &systemsettings;
+
+
+
+ KInfoCenter
+ Kinfocenter originated as part of Kcontrol standing alone from KDE 3.1. In KDE SC 4 it is replaced by modules configured in System Settings, notably Solid, and is being reintroduced as an application in &kde; SC 4.5.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Kinfocenter"&linkmid;Wikipedia: KInfoCenter&linkend;
+ &kde;
+ Solid
+ &systemsettings;
+
+
+
+ &konqueror;
+ &konqueror; is a web browser, picture viewer, file manager
+ and more, and a core part of the &kde; project. You can
+ find more information about &konqueror; at &linkstart;"http://www.konqueror.org"&linkmid;www.konqueror.org&linkend;.
+ &kde;
+
+
+
+ KRunner
+ The mini-command-line that is accessed from the Classic menu, the keyboard shortcut &Alt;+F2, or a right-click on the desktop. In &kde; SC 4 a partial name will display all possible matches.&newpara;
+ More info:&newpara;
+ &linkstart;"http://userbase.kde.org/Tutorials/Krunner"&linkmid;UserBase: KRunner Usage&linkend;
+ &kde;
+ &plasma;
+
+
+
+ KWin
+ KWin is the window manager. This is where window decorations can be changed and themes applied. &kde; SC 4 extends KWin to provide support for 3D Compositing effects on the desktop.&newpara;
+ More info:&newpara;
+ &linkstart;"http://userbase.kde.org/KWin"&linkmid;UserBase: KWin&linkend;
+ &kde;
+ &X-Server;
+
+
+
+ Mini-CLI
+ Mini &emstart;C&emend;ommand &emstart;L&emend;ine &emstart;I&emend;nterface. Synonym to KRunner.
+ KRunner
+
+
+
+ Pager
+ A pager is a small program or panel applet which shows the position of windows on your desktop and usually if you have several Virtual Desktops gives an overview over all.
+ &kde;
+ Kickoff
+ Kicker
+ Panel
+ &plasma;
+ Virtual Desktops
+
+
+
+ &systemsettings;
+ This is the project and filename of the &kde; control
+ center. &systemsettings; allows you to customize virtually
+ every configuration option of &kde;.
+ &kde;
+ KInfoCenter
+
+
+
+
+
+ Desktop Terminology
+
+ Activities
+ Activities are sets of &plasma; widgets that have their own wallpaper&newpara;
+ A bit like Virtual Desktops, but not quite. For example you have a "work activity" with commit rss feeds, a note with your TODO, a Folder View with your work related files, and a subtle wallpaper.&newpara;
+ Next to it, you have your freetime activity, with previews of family photos and dogs, rss feeds from your favorite blogs, a Folder View showing your movie collection, a twitter applet and of course that Iron Maiden wallpaper you have been loving since the early 80s.&newpara;
+ At 17:00 hours sharp you switch from the work activity to your freetime activity.&newpara;
+ More info:&newpara;
+ &linkstart;"http://userbase.kde.org/Plasma"&linkmid;Plasma FAQ&linkend;
+ &kde;
+ Virtual Desktops
+
+
+
+ Containment
+ A Containment is a top level grouping of widgets. Each Containment manages the layout and configuration data of its set of widgets independently from other Containments.&newpara;
+ The end result is that you can group widgets within a Containment according to the significance to your working pattern, rather than by directory grouping.&newpara;
+ More info:&newpara;
+ &linkstart;"http://userbase.kde.org/Plasma"&linkmid;Plasma FAQ&linkend;
+ &kde;
+ Widget
+
+
+
+ Drag and Drop
+ This concept tries to replace many actions like copying
+ files from one place to another by a certain mouse movement, ⪚
+ clicking on an icon in a &konqueror; window, moving the mouse to another
+ window while keeping the mouse button pressed, and releasing the mouse
+ button ("dropping" the object) copies files.
+ &konqueror;
+
+
+
+ Extender
+ Extenders are a special kind of popup that can grow out of a &plasma; panel for example. Extenders have detachable parts. Extenders are a new concept that arrived in &plasma; for &kde; 4.2. The Kuiserver (the interface that collects all long running jobs and puts them into one window) will make use of extenders so you can detach various jobs and monitor their progress separately.&newpara;
+ More info:&newpara;
+ &linkstart;"http://userbase.kde.org/Plasma"&linkmid;Plasma FAQ&linkend;
+ &kde;
+ &plasma;
+
+
+
+ GNOME
+
+ &emstart;G&emend;NU &emstart;N&emend;etwork &emstart;O&emend;bject
+ &emstart;M&emend;odel &emstart;E&emend;nvironment, one of the
+ leading &UNIX; &GUI;s.
+ &GUI;
+
+
+
+ &GUI;
+ Abbreviation for &emstart;G&emend;raphical
+ &emstart;U&emend;ser &emstart;I&emend;nterface. Every desktop
+ environment (like &kde;) is a &GUI;. Most
+ &GUI;s feature mouse support and/or windows to manage
+ the programs.
+ &kde;
+
+
+
+ Home Directory
+ That's the place in system, where all your files are kept. You can write your files outside of this folder, but all applications are configured to propose this folder as place to write your files to. And this is easier, when you are keeping your things here.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Home_directory"&linkmid;Wikipedia: Home Directory&linkend;
+ &dolphin;
+
+
+
+ &kde;
+ Abbreviation for "K Desktop Environment", a
+ leading &GUI; for &UNIX;-based systems. You can find more
+ detailed information at &linkstart;
+ "http://www.kde.org"&linkmid;www.kde.org&linkend;.&newpara;
+ &kde; is more than just software. It is a community made up of programmers, translators, contributors, artists, writers, distributors, and users from all over the world. Our international technology team is committed to creating the best free software for the desktop. And not only contributors, but users and fans of &kde; software can be found throughout the entire globe, giving help to other users, spreading the news, or just simply enjoying the experience.
+ &GUI;
+
+
+
+ &kicker;
+
+ In &kde; 3, the relocatable bar, usually at the bottom of the screen (sometimes called the Panel), on which application launchers, the Pager, and buttons for running applications reside.
+ Panel
+ &plasma;
+
+
+
+ &kickoff;
+
+ In &kde; SC 4 (and some late versions of &kde; 3), a launch menu in which apps are sorted by functional group. 'Favorites' replaces the 'Most used applications' in Classic Menu, and applications can be added to it. Right-click also offers the possibility of adding applications to the desktop or panel. Rapid access to a less-used application can be by the search box. Other menus are being worked on, since &kde; SC 4 can be used with more than one launcher, should that be required.&newpara;
+ More info:&newpara;
+ &linkstart;"http://home.kde.org/~binner/kickoff/sneak_preview.html"&linkmid;Kickoff Sneak Preview&linkend;
+ &kde;
+ Pager
+ Panel
+ &plasma;
+
+
+
+ Oxygen
+
+ Oxygen is the default theme of &kde; SC 4. Designed to bring 'a breath of fresh air' to the desktop by removing the simplistic, cartoonish icons, and replacing them with a clean theme and photo-realistic icons. Oxygen uses a desaturated palette to avoid the icons becoming a distraction and uses detailed scalable graphics (SVG).&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Oxygen_Project"&linkmid;Wikipedia: Oxygen Project&linkend;&newpara;
+ &linkstart;"http://www.oxygen-icons.org/?cat=3"&linkmid;Oxygen Icons&linkend;
+ &kde;
+ KSVG
+ &plasma;
+
+
+
+ Panel
+ Refers to the panel which often resides at the bottom of the
+ screen.
+ &kde;
+ &kicker;
+ &kickoff;
+ &plasma;
+
+
+
+ Plasma
+ In &kde; SC 4 the &plasma; Desktop replaces KDesktop, &kicker; and the SuperKaramba widget engine. The applets are called Plasmoids, and range from informational widgets to mini-apps such as a calculator or dictionary. Widgets from other sources, such as SuperKaramba widgets or Google Gadgets are also supported.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Plasma_(KDE)"&linkmid;Wikipedia: Plasma&linkend;&newpara;
+ &linkstart;"http://plasma.kde.org/cms/1107/"&linkmid;Plasma website&linkend;&newpara;
+ &linkstart;"http://userbase.kde.org/Plasma"&linkmid;Plasma FAQ&linkend;&newpara;
+ &linkstart;"http://userbase.kde.org/Tutorials/TweakingPlasma"&linkmid;Tweaking Plasma&linkend;
+ &kde;
+ &kicker;
+ Widget
+
+
+
+ Ripping
+ The process of reading audio data from a &cdrom; and
+ storing it on the hard disk.
+
+
+
+ Virtual Desktops
+ A popular concept of &UNIX; based window managers is the one of virtual desktops. This means you have not only one screen where you can place your windows on but several. When you switch to a different desktop (usually with a pager) you will only see the windows which you started on your new desktop or moved to it. A window can also be made "sticky" which means it appears on all virtual desktops.&newpara;
+ More info:&newpara;
+ &linkstart;"http://userbase.kde.org/Plasma"&linkmid;Plasma FAQ&linkend;
+ &kde;
+ &kickoff;
+ Pager
+
+
+
+
+
+ &kde; Development
+
+ &Qt;
+ The &GUI; of &kde; is built on top of
+ the &Qt; toolkit, which provides many graphical elements (so-called
+ "Widgets") which are used to construct the desktop. You
+ can find more information about &Qt; at &linkstart;
+ "http://qt-project.org/"&linkmid;http://qt-project.org/&linkend;.
+ &kde;
+ &GUI;
+ Widget
+
+
+
+ Git
+ Git is a free and open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&newpara;
+ Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.&newpara;
+ Git is used for version control of files, much like tools such as Mercurial, Bazaar, Subversion, CVS, Perforce, and Visual SourceSafe.&newpara;
+ It was decided that Git will be the main version control system of &kde;, replacement of SVN. It has been already used for some &kde; projects like Konversation and Amarok.&newpara;
+ More info:&newpara;
+ &linkstart;"http://git-scm.com/"&linkmid;Git Homepage&linkend;
+ &kde;
+ SVN
+
+
+
+ i18n
+ Abbreviation for "internationalization". &kde;
+ supports many different languages, and several i18n techniques make it
+ easy to translate the &GUI; as well as the accompanying
+ documents of &kde; into all these languages. More information about the
+ i18n process is available at &linkstart;
+ "http://l10n.kde.org"&linkmid;l10n.kde.org&linkend;.
+ &kde;
+ &GUI;
+
+
+
+ Kross
+ Kross is a scripting framework, enabling support for multiple scripting languages. A plugin system allows for the support of further languages in the future.
+ &kde;
+
+
+
+ KDOM
+ A KPart module making KHTML DOM (&emstart;D&emend;ocument &emstart;O&emend;bject &emstart;M&emend;odel) rendering capabilities available to all applications. KSVG2 is built on KDOM for &kde; SC 4.
+ &kde;
+ KHTML
+ KParts
+ KSVG
+
+
+
+ KJS
+ &kde; platform's JavaScript engine.
+ &kde;
+ KParts
+ &plasma;
+
+
+
+ KSVG
+ KSVG enables support for scalable vector graphics in a KHTML browser. KSVG2 extends this for &kde; SC 4.
+ &kde;
+ KHTML
+ KParts
+
+
+
+ l10n
+ Abbreviation for "localization", the process
+ of adapting a program to the local environment. This includes ⪚ the
+ currency used for monetary values or the time format.
+ i18n
+
+
+
+ Strigi
+ A deep-indexed search daemon, Strigi aims to be fast and light-weight. It also uses SHA-1 hash which will help in the identification of duplicate files.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Strigi"&linkmid;Wikipedia: Strigi&linkend;
+ &kde;
+
+
+
+ Widget
+ Graphical elements like scrollbars, buttons or input
+ fields which are used by &kde; to construct the &GUI;.
+
+ &kde;
+ &GUI;
+
+
+
+ SVN
+ Abbreviation for &emstart;Subversion&emend;, a version control system. The SVN is a very elegant way of managing file versions that allow more than one developer to easily work on the same project. You can find a description of how to get the latest (developer) version of the &kde; sources via anonymous SVN on &linkstart;"http://developer.kde.org/source/anonsvn.html"&linkmid;http://developer.kde.org/source/anonsvn.html&linkend;.&newpara; More about SVN is available at &linkstart;"http://subversion.tigris.org/"&linkmid;http://subversion.tigris.org/&linkend;.
+ Git
+
+
+
+ XMLGUI
+ A programmers' framework for designing the user interface. It is extensively used by KParts.&newpara;
+ More info:&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/XMLGUI"&linkmid;Wikipedia: XMLGUI&linkend;&newpara;
+ &linkstart;"http://en.wikipedia.org/wiki/Qt_Style_Sheets"&linkmid;Wikipedia: Qt Style Sheets&linkend;
+ &GUI;
+ Kparts
+ &Qt;
+
+
+
+
+
+ Miscellaneous
+
+ RFC
+ &emstart;R&emend;equest &emstart;F&emend;or
+ &emstart;C&emend;omment. A common way to publish new protocol
+ ideas or procedures for evaluation of the Internet community. Though
+ RFCs are not mandatory, many applications try to
+ adhere to them, once they have been approved by the community.&newpara;
+ More information about RFCs can be found at the
+ &linkstart;"http://www.rfc-editor.org"&linkmid;RFC Homepage&linkend;.
+
+
+
+
+
+ Various protocols
+
+ SMB
+ &emstart;S&emend;erver &emstart;M&emend;essage
+ &emstart;B&emend;lock. A network protocol used in &Microsoft; &Windows;
+ networks to access the file systems of other computers.
+ IO Slave
+
+
+
+ IRC
+ &emstart;I&emend;nternet &emstart;R&emend;elay
+ &emstart;C&emend;hat. A protocol defined in RFC
+ 1459, which handles the specification to enable real-time text chat.
+ RFC
+
+
+
+ Host
+ This can either be a name from your
+ /etc/hosts file
+ (mycomputer),
+ an Internet name (www.kde.org) or an IP-Address
+ (192.168.0.10).
+
+
+
+
+
+ &glossary-kdeprinting;
+
diff --git a/doc/glossary/kdeprintingglossary.docbook b/doc/glossary/kdeprintingglossary.docbook
new file mode 100644
index 00000000..fffc420b
--- /dev/null
+++ b/doc/glossary/kdeprintingglossary.docbook
@@ -0,0 +1,941 @@
+
+
+
+ Printing
+
+
+
+ ACLs
+ Abbreviation for &emstart;A&emend;ccess
+ &emstart;C&emend;ontrol &emstart;L&emend;ists;
+ ACLs are used to check for the access by a given
+ (authenticated) user. A first rough support for ACLs
+ for printing is available from &CUPS;; this will be refined
+ in future versions.
+ Authentication
+
+
+
+
+ AppSocket Protocol
+ AppSocket is a protocol for the transfer of
+ print data, also frequently called "Direct TCP/IP Printing".
+ &Hewlett-Packard; have taken AppSocket, added a few minor
+ extensions around it and been very successful in renaming
+ and marketing it under the brand "&HP; JetDirect"...
+ &HP; JetDirect Protocol
+ Direct TCP/IP Printing
+
+
+
+
+ APSfilter
+ APSfilter is used mainly in the context of "classical"
+ &UNIX; printing (BSD-style LPD). It is a sophisticated shell script,
+ disguised as an "all-in-one" filtering program. In reality,
+ APSfilter calls "real filters" to do the jobs needed. It sends
+ printjobs automatically through these other filters, based on an
+ initial file-type analysis of the printfile.
+ It is written and maintained by Andreas Klemm.&newpara;
+ It is
+ similar to Magicfilter and mostly uses Ghostscript for file conversions.
+ Some Linux Distributions (like &SuSE;) use APSfilter, others
+ Magicfilter (like &RedHat;), some have both for preference selection
+ (like *BSD).&newpara;
+ &CUPS; has &emstart;no&emend; need for APSfilter,
+ as it runs its own file type recognition (based on &MIME; types)
+ and applies its own filtering logic.
+ Ghostscript
+ Magicfilter
+ &MIME;-Types
+ printcap
+
+
+
+
+ Authentication
+ Proving the identity of a certain person (maybe via username/password
+ or by means of a certificate) is often called authentication. Once you are
+ authenticated, you may or may not get access to a requested resource,
+ possibly based on ACLs.
+ ACLs
+
+
+
+
+ Bi-directional communication
+ In the context of printing, a server or a host may receive additional
+ information sent back from the printer (status messages &etc;), either
+ upon a query or unrequested. AppSocket ( = &HP; JetDirect), &CUPS; and IPP
+ support bi-directional communication, LPR/LPD and BSD-style printing
+ do not...
+ AppSocket Protocol
+ &CUPS;
+ Direct TCP/IP Printing
+ &HP; JetDirect
+ IPP
+ LPR/LPD
+
+
+
+
+ BSD-style Printing
+ Generic term for different variants of the traditional &UNIX;
+ printing method. Its first version appeared in the early 70s on
+ BSD &UNIX; and was formally described in &linkstart;"http://www.rfc.net/rfc1179.html"&linkmid;RFC 1179&linkend; only as late
+ as 1990.&newpara;
+ At the time when BSD "remote" printing was first designed, printers
+ were serially or otherwise directly connected devices to a host
+ (with the Internet hardly consisting of more than 100 nodes!); printers
+ used hole-punched, continuous paper, fed through by a tractor
+ mechanism, with simple rows of ASCII text mechanically hammered on to
+ the medium, drawn from a cardboard box beneath the table. It came out
+ like a zig-zag folded paper "snake". Remote printing consisted of a
+ neighboring host in the next room sending a file
+ asking for printout.&newpara;
+ How technology has changed! Printers generally use cut-sheet media, they have
+ built-in intelligence to compute the raster images of pages after pages
+ that are sent to them using one of the powerful page description
+ languages (PDL). Many are network nodes in their own right,
+ with CPU, RAM, a hard disk and their own Operation System, and
+ are hooked to a net with potentially millions of users...&newpara;
+ It is a vast proof of the flexible &UNIX; concept for doing things,
+ that it made "Line Printing" reliably work even under these modern
+ conditions. But time has finally come now to go for something new
+ -- the IPP.
+
+ IPP
+ &CUPS;
+ LPR/LPD printing
+
+
+
+
+ &CUPS;
+ Abbreviation for &emstart;C&emend;ommon
+ &emstart;U&emend;NIX &emstart;P&emend;rinting
+ &emstart;S&emend;ystem; &CUPS; is the most modern &UNIX; and Linux
+ printing system, also providing cross-platform print services
+ to &Microsoft; &Windows; and Apple &MacOS; clients. Based on IPP, it does
+ away with all the pitfalls of old-style BSD printing,
+ providing authentication, encryption and ACLs, plus many more
+ features. At the same time it is backward-compatible enough
+ to serve all legacy clients that are not yet up to IPP, via
+ LPR/LPD (BSD-style).&newpara;
+ &CUPS; is able to control any &PostScript; printer by
+ utilizing the vendor-supplied PPD (PostScript Printer
+ Description file), targeted originally for &Microsoft; Windows NT
+ printing only. &kde; Printing is most powerful if based on
+ &CUPS;.&newpara;
+ More info:&newpara;
+ &linkstart;"http://www.cups.org"&linkmid;&CUPS; Homepage&linkend;
+ ACLs
+ Authentication
+ BSD-style printing
+ IPP
+ LPR/LPD
+ PPD
+
+
+
+
+
+ &CUPS;-FAQ
+ &linkstart;"http://www.cups.org/articles.php?L+TFAQ"&linkmid;&CUPS;-FAQ&linkend;
+ is a valuable resource to answer many questions that anyone new to
+ &CUPS; printing might have at first.
+
+
+
+
+
+ Daemon
+ Abbreviation for &emstart;D&emend;isk
+ &emstart;a&emend;nd &emstart;e&emend;xecution
+ &emstart;mon&emend;itor; Daemons are present
+ on all &UNIX; systems to perform tasks independent of user
+ intervention. Readers more familiar with &Microsoft; &Windows; might
+ want to compare daemons and the tasks they are responsible
+ with "services".&newpara;
+ One example of a daemon present on most
+ legacy &UNIX; systems is the LPD (Line Printer Daemon); &CUPS; is
+ widely seen as the successor to LPD in the &UNIX; world and
+ it also operates through a daemon.
+ SPOOLing
+
+
+
+
+ Database, Linuxprinting.org
+ Already years ago, when Linux printing was still really difficult
+ (only command line printing was known to most Linux users, no device
+ specific print options were available for doing the jobs), Grant Taylor,
+ author of the "Linux Printing HOWTO", collected most of the available
+ information about printers, drivers and filters in his database.&newpara;
+ With the emerging
+ &CUPS; concept, extending the use of PPDs even to non-PostScript printers,
+ he realized the potential of this database: if one puts the different
+ datablobs (with content that could be described along the lines
+ "Which device prints with which Ghostscript or other
+ filter?", "How well?", and "What command line switches are available?") into
+ PPD-compatible files, he could have all the power of &CUPS; on top of
+ the traditional printer "drivers".&newpara;
+ This has now developed into a broader
+ concept, known as "Foomatic". Foomatic extends the capabilities
+ of spoolers other than &CUPS; (LPR/LPD, LPRng, PDQ, PPR) to a certain
+ degree ("stealing" some concepts from &CUPS;). The Linuxprinting
+ Database is not a Linux-only stop -- people running other &UNIX;
+ based OSes (like *BSD or &MacOS; X) will also find valuable information
+ and software there.
+
+ Foomatic
+ Linuxprinting database
+
+
+
+
+ Direct TCP/IP Printing
+ This is a method that often uses TCP/IP port 9100 to connect
+ to the printer. It works with many modern network printers and has
+ a few advantages over LPR/LPD, as it is faster and provides some
+ "backchannel feedback data" from the printer to the host sending
+ the job.
+ AppSocket Protocol
+ &HP; JetDirect Protocol
+
+
+
+
+
+ Drivers, Printer Drivers
+ The term "printer drivers", used in the same sense
+ as on the &Microsoft; &Windows; platform, is not entirely applicable
+ to a Linux or &UNIX; platform. A "driver" functionality
+ is supplied on &UNIX; by different modular components working
+ together. At the core of the printer drivers are "filters". Filters convert
+ print files from a given input format to another format that is acceptable
+ to the target printer. In many cases filters may be connected to a whole
+ filter "chain", where only the result of the last conversion is sent to the
+ printer. The actual transfer of the print data to the device is performed by
+ a "backend".
+
+ Filter
+ PPDs
+
+
+
+
+ Easy Software Products
+ Mike Sweet's company, which has contributed a few substantial
+ software products towards the Free Software community; amongst
+ them the initial version of &linkstart;
+ "http://gimp-print.sf.net/"&linkmid;Gimp-Print,&linkend; the &linkstart;
+ "http://www.easysw.com/epm/"&linkmid;EPM software packaging&linkend; tool
+ and &linkstart;"http://www.easysw.com/htmldoc/"&linkmid;HTMLDOC&linkend;
+ (used by the "Linux Documentation Project" to build the PDF versions
+ of the HOWTOs) -- but most importantly: &linkstart;
+ "http://www.cups.org/"&linkmid;&CUPS;&linkend; (the 'Common &UNIX; Printing
+ System').&newpara;
+ ESP financed themselves by selling a commercial version
+ of &CUPS;, called ESP PrintPro,
+ that includes some professional enhancements.
+ ESP Print Pro was purchased by Apple Inc. in February of 2007. ESP Print Pro software and support are no longer available from Easy Software Products. ESP Print Pro users were given non-expiring, floating licenses which may be accessed from the MyESP pages.
+
+ &CUPS;
+ ESP
+ Gimp-Print
+
+
+
+
+ Encryption
+ Encryption of confidential data is an all-important issue if
+ you transfer it over the Internet or even within intranets.&newpara;
+ Printing
+ via traditional protocols is not encrypted at all -- it is very easy
+ to tap and eavesdrop ⪚ into &PostScript; or PCL data transferred
+ over the wire.&newpara;
+ Therefore, in the design of IPP, provision was made for the easy
+ plugin of encryption mechanisms (which can be provided by the same
+ means as the encryption standards for HTTP traffic: SSL and TLS).
+ Authentication
+ &CUPS;
+ IPP
+ SSL
+ TLS
+
+
+
+
+
+ Epson
+ Epson inkjets are among the best supported models by Free software
+ drivers, as the company was not necessarily as secretive about their
+ devices and handed technical specification documents to developers.
+ The excellent print quality achieved by Gimp-Print on the Stylus
+ series of printers can be attributed to this openness.
+
+
+
+
+
+
+ Escape Sequences
+ The first ever printers printed ASCII data only. To
+ initiate a new line, or eject a page, they included special
+ command sequences, often carrying a leading [ESC]-character.
+ &HP; evolved this concept through its series of PCL language
+ editions until today, having now developed a full-blown
+ Page Description Language (PDL) from these humble beginnings.
+
+ PCL
+ PDL
+
+
+
+
+ ESC/P
+ Abbreviation for &emstart;E&emend;pson
+ &emstart;S&emend;tandard &emstart;C&emend;odes for
+ &emstart;P&emend;rinters. Besides &PostScript; and PCL, Epson's ESC/P
+ printer language is one of the best known.
+ PCL
+ &PostScript;
+ hpgl
+
+
+
+
+ ESP
+ Abbreviation for &emstart;E&emend;asy
+ &emstart;S&emend;oftware &emstart;P&emend;roducts;
+ the company that developed &CUPS; (the "Common &UNIX; Printing System").
+
+ Easy Software Products
+ &CUPS;
+
+
+
+
+
+ Filter
+ Filters, in general, are programs that take some input
+ data, work on it and pass it on as their output data. Filters
+ may or may not change the data.&newpara;
+ Filters in the context of printing, are programs that convert
+ a given file (destined for printing, but not suitable in the
+ format it is presently) into a printable format. Sometimes
+ whole "filter chains" have to be constructed to achieve the
+ goal, piping the output of one filter as the input to the next.
+
+ Ghostscript
+ RIP
+
+
+
+
+ Foomatic
+ Foomatic started out as the wrapper name for a set of
+ different tools available from &linkstart;"http://www.linuxfoundation.org/collaborate/workgroups/openprinting/database/foomatic"&linkmid;Linuxprinting.org&linkend;
+ These tools aimed to make the usage of traditional
+ Ghostscript and other print filters easier for users and
+ extend the filters' capabilities by adding more command line
+ switches or explain the driver's execution data.&newpara;
+ More recently, Foomatic gravitated towards becoming a "meta-spooling"
+ system, that allows configuration of the underlying print subsystem
+ through a unified set of commands (however, this is much more
+ complicated than &kde; printing &GUI; interface, which performs a similar
+ task with regards to different print subsystems).
+
+
+
+
+ Ghostscript
+ Ghostscript is a an interpreter for the &PostScript; language and for PDF or Raster Image Processor (RIP) in software, originally developed by L. Peter Deutsch. There is always a GPL version
+ of Ghostscript available for free usage and distribution.
+ Ghostscript is widely used inside the Linux and &UNIX; world
+ for transforming &PostScript; into raster data suitable
+ for sending to non-&PostScript; devices.
+ More info:
+ &linkstart;"http://www.ghostscript.com/"&linkmid;Ghostscript Homepage&linkend;
+ &PostScript;
+ RIP
+
+
+
+
+ Gimp-Print
+ Contrary to its name, Gimp-Print is no longer
+ just the plugin to be used for printing from the popular
+ Gimp program -- its codebase can also serve to be compiled
+ into...&newpara;
+ ...a set of PPDs and associated filters that integrate seamlessly
+ into &CUPS;, supporting around 130 different printer models, providing
+ photographic output quality in many cases;&newpara;
+ ...a Ghostscript filter that can be used with any other
+ program that needs a software-RIP;&newpara;
+ ...a library that can be used by other software applications
+ in need of rasterization functions.
+ Lexmark Drivers
+ RIP
+ Ghostscript
+
+
+
+
+ &HP;
+ Abbreviation for &emstart;H&emend;ewlett-&emstart;Packard&emend;;
+ one of the first companies to distribute their own Linux printer
+ drivers. -- More recently, the Company has released their
+ "HPIJS" package of drivers, including source code and a Free license.
+ This is the first printer manufacturer to do so. HPIJS supports most
+ current models of HP Ink- and DeskJets.
+
+
+
+
+
+
+ &HP;/GL
+ Abbreviation for &emstart;&HP;&emend;
+ &emstart;G&emend;raphical &emstart;L&emend;anguage;
+ a &HP; printer language mainly used for plotters; many CAD
+ (Computer Aided Design) software programs output &HP;/GL files for
+ printing.
+ ESC/P
+ PCL
+ &PostScript;
+
+
+
+
+ &HP; JetDirect Protocol
+ A term branded by &HP; to describe their implementation
+ of print data transfer to the printer via an otherwise "AppSocket" or
+ "Direct TCP/IP Printing" named protocol.
+ AppSocket Protocol
+ Direct TCP/IP Printing
+
+
+
+
+ IETF
+ Abbreviation for &emstart;I&emend;nternet
+ &emstart;E&emend;ngineering &emstart;T&emend;ask
+ &emstart;F&emend;orce; an assembly of Internet, software
+ and hardware experts that discuss
+ new networking technologies and very often arrive at
+ conclusions that are regarded by many as standards. "TCP/IP"
+ is the most famous example.&newpara;
+ IETF standards, as well as
+ drafts, discussions, ideas and useful tutorials, are
+ put in writing in the famous series of "RFCs", which
+ are available to the public and included in most Linux and
+ BSD distributions.
+ IPP
+ PWG
+ RFC
+
+
+
+
+ IPP
+ Abbreviation for &emstart;I&emend;nternet
+ &emstart;P&emend;rinting &emstart;P&emend;rotocol;
+ defined in a series of RFCs accepted by the IETF with
+ status "proposed standard"; was designed
+ by the PWG. -- IPP is a completely new design for network printing,
+ but it utilizes a very well-known and proven method for the
+ actual data transfer: HTTP 1.1! By not "re-inventing the wheel",
+ and basing itself on an existing and robust Internet standard,
+ IPP is able to relatively easily bolt other HTTP-compatible standard
+ mechanisms into its framework:&newpara;
+
+ Basic, Digest or Certificate authentication mechanisms&newpara;
+ SSL or TLS for encryption of transferred data&newpara;
+ LDAP for directory services (to publish
+ data on printers, device-options, drivers, costs or
+ also to the network; or to check for passwords while
+ conducting authentication)
+
+
+ &CUPS;
+ PWG
+ IETF
+ RFC
+ TLS
+
+
+
+
+
+ Lexmark
+ was one of the first companies to distribute their own Linux printer
+ drivers for some of their models. However, those drivers are binary only
+ (no source code available), and therefore cannot be used to integrate into
+ other Free printing software projects.
+
+
+
+
+
+ Linuxprinting.org
+ Linuxprinting.org = not just for Linux; all &UNIX;-like OS-es,
+ like *BSD and commercial Unices may find useful printing
+ information on this site. This web site is the home for the interesting
+ Foomatic project, that strives to develop the "Meta Print Spool and Driver
+ Configuration Toolset" (being able to configure, through one common
+ interface, different print subsystems and their required drivers) with the
+ ability to transfer all queues, printers and configuration files seamlessly
+ to another spooler without new configuration effort. -- Also, they maintain
+ the Printing Database; a collection of driver and device information that
+ enables everybody to find the most current information about printer models,
+ and also generate online the configuration files for any
+ spooler/driver/device combo known to work with one of the common Linux or
+ &UNIX; print subsystems.
+
+ Linuxprinting database
+
+
+
+
+
+ Linuxprinting.org Database
+ &linkstart;"http://www.openprinting.org/printers"&linkmid;Database&linkend; containing printers and drivers that are suitable for them.
+ More info:
+ &linkstart;"http://www.linuxfoundation.org/collaborate/workgroups/openprinting/database/indexfaq"&linkmid;Linuxprinting.org FAQ&linkend;
+ Foomatic
+
+
+
+
+ LPR/LPD printing
+ LPR == some people translate &emstart;L&emend;ine
+ &emstart;P&emend;rinting &emstart;R&emend;equest, others:
+ &emstart;L&emend;ine &emstart;P&emend;rinter
+ &emstart;R&emend;emote.
+ BSD-style printing
+
+
+
+
+ Magicfilter
+ Similarly to the APSfilter program, Magicfilter
+ provides automatic file type recognition functions and, base
+ on that, automatic file conversion to a printable format,
+ depending on the target printer.
+ APSfilter
+
+
+
+
+ &MIME;-Types
+ Abbreviation for &emstart;M&emend;ultipurpose (or
+ Multimedia) &emstart;I&emend;nternet &emstart;M&emend;ail
+ &emstart;E&emend;xtensions; &MIME;-Types were first used to allow
+ the transport of binary data (like mail attachments containing
+ graphics) over mail connections that were normally only transmitting
+ ASCII characters: the data had to be encoded into an ASCII representation.&newpara;
+ Later this concept was extended to describe a data format in
+ a platform independent, but at the same time non-ambiguous, way.
+ From &Windows; everybody knows the .doc extensions for &Microsoft; Word files.
+ This is handled ambiguously on the &Windows; platform: .doc extensions are also
+ used for simple text files or for Adobe Framemaker files. And if a real
+ Word file is renamed with a different extension, it can no longer be
+ opened by the program.&newpara;
+ &MIME; typed files carry a recognition string with them, describing
+ their file format based on &emstart;main_category/sub_category&emend;.
+ Inside IPP, print files are also described using the &MIME; type scheme.
+ &MIME; types are registered with the IANA (Internet Assigning Numbers
+ &emstart;Association&emend;) to keep them unambiguous.&newpara;
+ &CUPS; has some &MIME; types of its own registered, like
+ &emstart;application/vnd.cups-raster&emend; (for the &CUPS;-internal
+ raster image format).
+
+ &CUPS;
+ Easy Software Products
+ Gimp-Print
+
+
+
+
+ PCL
+ Abbreviation for &emstart;P&emend;rinter
+ &emstart;C&emend;ontrol &emstart;L&emend;anguage;
+ developed by &HP;. PCL started off in version 1 as a simple
+ command set for ASCII printing; now,
+ in its versions PCL6 and PCL-X, it is capable of printing graphics
+ and color -- but outside the &Microsoft; &Windows; realm and &HP-UX;
+ (&HP;'s own brand of &UNIX;), it is not commonly used...
+ ESC/P
+ &HP;/GL
+ PDL
+ &PostScript;
+
+
+
+
+ PDL
+ Abbreviation for &emstart;P&emend;age
+ &emstart;D&emend;escription &emstart;L&emend;anguage;
+ PDLs describe, in an abstract way, the graphical representation
+ of a page. - Before it is actually transferred into
+ toner or ink laid down on to paper, a PDL needs to be
+ "interpreted" first. In &UNIX;, the most important PDL
+ is &PostScript;.
+
+ ESC/P
+ &HP;/GL
+ PCL
+ &PostScript;
+
+
+
+
+ Pixel
+ Abbreviation for &emstart;Pic&emend;ture
+ &emstart;El&emend;ement; this term describes the smallest
+ part of a raster picture (either as printed on paper
+ or as displayed on a monitor by cathode rays or LCD elements). As
+ any graphical or image representation on those types of output
+ devices is composed of pixels, the values of "ppi" (pixel per inch)
+ and &dpi; (dots per inch) are one important parameter for the
+ overall quality and resolution of an image.
+ Filter
+ Ghostscript
+ &PostScript;
+ Raster
+
+
+
+
+ PJL
+ Abbreviation for &emstart;P&emend;rint
+ &emstart;J&emend;ob &emstart;L&emend;anguage;
+ developed by &HP; to control and influence default and per-job
+ settings of a printer. It may not only be used
+ for &HP;'s own (PCL-)printers; also many &PostScript;
+ and other printers understand PJL commands sent to them
+ inside a print job, or in a separate signal.
+ PCL
+
+
+
+
+ &PostScript;
+ &PostScript; (often shortened to "PS") is the de-facto
+ standard in the &UNIX; world for printing files. It was
+ developed by Adobe and licensed to printer manufacturers
+ and software companies.&newpara;
+ As the &PostScript; specifications were
+ published by Adobe, there are also "Third Party" implementations
+ of &PostScript; generating and &PostScript; interpreting software
+ available (one of the best-known in the Free software world
+ being Ghostscript, a powerful PS-interpreter).
+
+ ESC/P
+ &HP;/GL
+ PCL
+ PPD
+
+
+
+
+ PPD
+ Abbreviation for &emstart;P&emend;ostScript
+ &emstart;P&emend;rinter &emstart;D&emend;escription;
+ PPDs are ASCII files storing all information about the special
+ capabilities of a printer, plus definitions of the (PostScript-
+ or PJL-) commands to call on a certain capability (like print
+ duplexing).&newpara;
+ As the explanation of the acronym reveals, PPDs were originally
+ only used for &PostScript; printers. &CUPS; has extended the
+ PPD concept to all types of printers.&newpara;
+ PPDs for &PostScript; printers are provided by the printer
+ vendors. They can be used with &CUPS; and &kde; printing subsystem to have access
+ to the full features of any &PostScript; printer. The &kde; Team
+ recommends using a PPD originally intended for use with
+ &Microsoft; Windows NT.&newpara;
+ PPDs for non-PostScript printers &emstart;need&emend; a
+ companion "filter" to process the &PostScript; print files into
+ a format digestible for the non-PostScript target device. Those
+ PPD/filter combos are not (yet) available from the vendors. After
+ the initiative by the &CUPS; developers to utilize PPDs, the Free
+ Software community was creative enough to quickly come up with
+ support for most of the currently used printer models, through
+ PPDs and classical Ghostscript filters. But note: the printout
+ quality varies from "hi-quality photographic output" (using
+ Gimp-Print with most Epson inkjets) to "hardly readable" (using
+ Foomatic-enabled Ghostscript filters for models rated as
+ "paperweight" in the Linuxprinting.org database).
+
+ &CUPS;
+ Linuxprinting.org
+ &PostScript;
+
+
+
+
+ printcap
+ In BSD-style print systems, the "printcap" file holds
+ the configuration information; the printing daemon reads this file
+ to determine which printers are available, what filters are to be
+ user for each, where the spooling folder is located,
+ if there are banner pages to be used, and so on...
+ Some applications also depend on read access to the printcap
+ file, to obtain the names of available printers.
+ BSD-style printing
+
+
+
+
+
+ Printer-MIB
+ Abbreviation for
+ &emstart;Printer&emend;-&emstart;M&emend;anagement
+ &emstart;I&emend;nformation &emstart;B&emend;ase; the
+ Printer-MIB defines a set of parameters that are to be
+ stored inside the printer for access
+ through the network. This is useful if many (in some cases, literally
+ thousands) network printers are managed centrally
+ with the help of SNMP (Simple Network Management Protocol).
+ PWG
+ SNMP
+
+
+
+
+ PWG
+ Abbreviation for
+ &emstart;P&emend;rinter &emstart;W&emend;orking
+ &emstart;G&emend;roup; the PWG is a loose grouping of
+ representatives of the printer industry that has, in the past
+ years, developed different standards
+ in relation to network printing. These were later accepted by the
+ IETF as RFC standards, like the "Printer-MIB" and the IPP.
+ &PostScript;
+ IPP
+ Printer-MIB
+ SNMP
+
+
+
+
+
+
+ Printer Database
+ Good database of printer drivers can be found at &linkstart;"http://www.openprinting.org/printers"&linkmid;http://www.openprinting.org/printers&linkend;.
+ Linuxprinting Database
+
+
+
+
+ Raster Image
+ Every picture on a physical medium
+ is composed of a pattern of discrete dots in different colors and (maybe)
+ sizes. This is called a "raster image".&newpara;
+ This is as opposed to a "vector image"
+ where the graphic is described in terms of continuous curves, shades,
+ forms and filled areas, represented by mathematical formula. Vector images
+ normally have a smaller file size and may be scaled in size
+ without any loss of information and quality --- but they cannot be
+ output directly, but always have to be "rendered" or "rasterized"
+ first to the given resolution that the output device is capable of...&newpara;
+ The rasterization is done by a Raster Image Processor (RIP,
+ often the Ghostscript software) or some other filtering
+ instance.
+ Pixel
+ Ghostscript
+ &PostScript;
+ Filter
+ RIP
+
+
+
+
+ RIP
+ Abbreviation for
+ &emstart;R&emend;aster &emstart;I&emend;mage
+ &emstart;P&emend;rocess(or); if used in the context of
+ printing, "RIP" means a hardware or software
+ instance that converts &PostScript; (or other print formats
+ that are represented in one of the non-Raster PDLs) into a
+ raster image format in such a way that it is acceptable
+ for the "marking engine" of the printer.&newpara;
+ &PostScript; printers
+ contain their own PostScript-RIPs. A RIP may or may not be located
+ inside a printer.&newpara;
+ For many &UNIX; systems, Ghostscript is the package that provides
+ a "RIP in software", running on the host computer, and pre-digesting
+ the &PostScript; or other data to become ready to be sent to the
+ printing device (hence you may perceive a "grain of truth" in the
+ slogan "Ghostscript turns your printer into a &PostScript;
+ machine", which of course is not correct in the true sense of the
+ meaning).
+ Filter
+ Ghostscript
+ &PostScript;
+ PDL
+ Raster
+
+
+
+
+
+ RLPR (Remote LPR)
+ Abbreviation for &emstart;R&emend;emote
+ &emstart;L&emend;ine &emstart;P&emend;rinting
+ &emstart;R&emend;equest; this is a BSD-style printing system,
+ that needs no root privileges to be installed, and no "printcap" to
+ work: all parameters may be specified on the command
+ line.&newpara;
+ RLPR comes in handy for many laptop users who are
+ working in frequently changing environments. This is because it
+ may be installed concurrently with every other printing
+ sub system, and allows a very flexible and quick
+ way to install a printer for direct access via LPR/LPD.
+
+ printcap
+
+
+
+
+
+ SNMP
+ Abbreviation for &emstart;S&emend;imple
+ &emstart;N&emend;etwork &emstart;M&emend;anagement
+ &emstart;P&emend;rotocol; SNMP is widely used to control
+ all types of network node (Hosts, Routers, Switches, Gateways,
+ Printers...) remotely.
+ PWG
+ Printer-MIB
+
+
+
+
+ SSL(3) encryption
+ Abbreviation for &emstart;S&emend;ecure
+ &emstart;S&emend;ocket &emstart;L&emend;ayer;
+ SSL is a proprietary encryption method for data
+ transfer over HTTP that was developed by Netscape. It is now being
+ replaced by an IETF standard named TLS.
+
+ TLS
+
+
+
+
+
+ SPOOLing
+ Abbreviation for &emstart;S&emend;ynchronous
+ &emstart;P&emend;eripheral &emstart;O&emend;perations
+ &emstart;O&emend;n&emstart;L&emend;ine;
+ SPOOLing enables printing applications
+ (and users) to continue their work
+ as the job is being taken care of by a system daemon,
+ which stores the file at a temporary location until the printer is ready
+ to print.
+ Daemon
+
+
+
+
+
+ TLS encryption
+ Abbreviation for &emstart;T&emend;ransport
+ &emstart;L&emend;ayer &emstart;S&emend;ecurity;
+ TLS is an encryption standard for
+ data transferred over HTTP 1.1; it is defined in RFC 2246;
+ although based on the former SSL development
+ (from Netscape) it is not fully compatible with it.
+
+ SSL(3)
+
+
+
+
+
+ System V-style printing
+ This is the second flavor of traditional &UNIX;
+ printing (as opposed to BSD-style printing). It uses
+ a different command set (lp, lpadmin,...) to BSD,
+ but is not fundamentally different from it. However, the
+ gap between the two is big enough to make the two
+ incompatible, so that a BSD-client cannot simply print
+ to a System V style print server without additional
+ tweaking... IPP is supposed to resolve this weakness
+ and more.
+
+ BSD-style printing
+ IPP
+
+
+
+
+ TurboPrint
+ Shareware software providing photo quality printing for many
+ inkjet printers. It is useful if you are unable to find a driver for your
+ printer and may be hooked into either a traditional Ghostscript system
+ or a modern &CUPS; system.
+ Gimp-Print
+
+
+
+
+ XPP
+ Abbreviation for &emstart;X&emend;
+ &emstart;P&emend;rinting &emstart;P&emend;anel;
+ XPP was the first Free
+ graphical print command for &CUPS;, written by Till Kamppeter,
+ and in some ways a model for the "kprinter" utility in &kde; 3.
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/CMakeLists.txt b/doc/kcontrol/CMakeLists.txt
index 87f836a3..ce39a4a4 100644
--- a/doc/kcontrol/CMakeLists.txt
+++ b/doc/kcontrol/CMakeLists.txt
@@ -9,6 +9,21 @@ add_subdirectory(splashscreen)
add_subdirectory(powerdevil)
add_subdirectory(kwincompositing)
add_subdirectory(kwinscreenedges)
+add_subdirectory(bookmarks)
+add_subdirectory(icons)
+add_subdirectory(cookies)
+add_subdirectory(ebrowsing)
+add_subdirectory(useragent)
+add_subdirectory(khtml-general)
+add_subdirectory(khtml-plugins)
+add_subdirectory(khtml-java-js)
+add_subdirectory(khtml-behavior)
+add_subdirectory(khtml-adblock)
+add_subdirectory(nepomuk)
+add_subdirectory(attica)
+add_subdirectory(kcm_ssl)
+add_subdirectory(smb)
+add_subdirectory(emoticons)
if ( Q_WS_X11 )
add_subdirectory(autostart)
@@ -29,4 +44,22 @@ add_subdirectory(kwintabbox)
add_subdirectory(kcmsmserver)
add_subdirectory(workspaceoptions)
add_subdirectory(khotkeys)
+add_subdirectory(cache)
+add_subdirectory(filemanager)
+add_subdirectory(filetypes)
+add_subdirectory(kcmcgi)
+add_subdirectory(kcmcss)
+add_subdirectory(kcmlaunch)
+add_subdirectory(kcmnotify)
+add_subdirectory(language)
+add_subdirectory(netpref)
+add_subdirectory(performance)
+add_subdirectory(proxy)
+add_subdirectory(spellchecking)
+add_subdirectory(componentchooser)
+add_subdirectory(kded)
+add_subdirectory(trash)
+add_subdirectory(history)
+add_subdirectory(solid-device-automounter)
+add_subdirectory(phonon)
endif ( Q_WS_X11 )
diff --git a/doc/kcontrol/attica/CMakeLists.txt b/doc/kcontrol/attica/CMakeLists.txt
new file mode 100644
index 00000000..63ca05e1
--- /dev/null
+++ b/doc/kcontrol/attica/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/attica)
diff --git a/doc/kcontrol/attica/index.docbook b/doc/kcontrol/attica/index.docbook
new file mode 100644
index 00000000..1f5d36ce
--- /dev/null
+++ b/doc/kcontrol/attica/index.docbook
@@ -0,0 +1,61 @@
+
+
+
+]>
+
+
+
+
+Social Desktop
+
+FrederikGladhorn
+gladhorn@kde.org
+
+
+
+
+
+2013-11-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+Social Desktop
+
+
+
+The Social Desktop (Open Collaboration Services) settings module lets you
+configure your user accounts for Open Collaboration Service Providers.
+
+At the time of writing openDesktop.org
+ is the first provider that you can use.
+You can use the web site or this settings dialog to register and manage your account.
+
+
+The benefit is that you can do more things in Get Hot New Stuff:
+vote for items, become a fan of them and upload new content. A configured
+account also allows you to use the social Plasma widgets (Community,
+Social News &etc;) to their full extent.
+
+
+Using the &systemsettings; module:
+
+You can select which provider to configure at the top.
+Either enter your existing user name and password to let &kde; use them.
+You can verify that these work by using the Test Login button
+
+
+
+If you do not have an account yet, use the Register tab.
+Here you need to fill out all fields.
+After clicking Register... you will receive an email from the
+server to activate your account.
+
+
+
diff --git a/doc/kcontrol/bookmarks/CMakeLists.txt b/doc/kcontrol/bookmarks/CMakeLists.txt
new file mode 100644
index 00000000..2f98e645
--- /dev/null
+++ b/doc/kcontrol/bookmarks/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/bookmarks)
diff --git a/doc/kcontrol/bookmarks/index.docbook b/doc/kcontrol/bookmarks/index.docbook
new file mode 100644
index 00000000..9f32fc43
--- /dev/null
+++ b/doc/kcontrol/bookmarks/index.docbook
@@ -0,0 +1,101 @@
+
+
+
+]>
+
+
+
+
+Bookmarks
+
+
+XavierVello
+xavier.vello@gmail.com
+
+
+
+
+2010-09-24
+0.2 (&kde; 4.5)
+
+
+KDE
+KControl
+bookmarks
+KIO
+
+
+
+Bookmarks home page
+This module lets you configure the bookmarks home page.
+To view the bookmarks home page enter bookmarks:/ in
+the location bar.
+The settings in this module are also accessible by entering
+bookmarks:/config in the location bar.
+
+General settings
+
+
+Number of columns to show
+
+Folders are automatically distributed in several columns. The optimal number of columns depends on the width of the konqueror window and the number of bookmarks you have.
+
+
+
+
+Show folder backgrounds
+
+Disable it on slow system to disable background images.
+
+
+
+
+
+
+Bookmarks
+
+
+Show bookmarks without folder
+
+If this option is unchecked, bookmarks at the root of the hierarchy (not in a folder) are not displayed. If checked, they are gathered in a "root" folder.
+
+
+
+
+Flatten bookmarks tree
+
+Sub-folders are shown within their parent by default. If you activate this option, sub-folders are displayed on their own. It looks less nice but it may help if you have a very big folder you want to spread in two columns.
+
+
+
+
+Show system places
+
+Show a box with KDE places (Home, Network, ...). Useful if you use konqueror as a file manager.
+
+
+
+
+
+
+Pixmap cache
+
+
+Disk cache size
+
+Specify how much disk space is used to cache the pixmaps.
+
+
+
+
+Clear Cache
+
+Remove all cached images. This may be necessary if some favicons become corrupt and don't refresh automatically.
+
+
+
+
+
+
diff --git a/doc/kcontrol/cache/CMakeLists.txt b/doc/kcontrol/cache/CMakeLists.txt
new file mode 100644
index 00000000..7509aba7
--- /dev/null
+++ b/doc/kcontrol/cache/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/cache)
diff --git a/doc/kcontrol/cache/index.docbook b/doc/kcontrol/cache/index.docbook
new file mode 100644
index 00000000..ce9ead36
--- /dev/null
+++ b/doc/kcontrol/cache/index.docbook
@@ -0,0 +1,66 @@
+
+
+
+]>
+
+
+Cache
+
+
+
+LauriWatts
+
+
+
+
+2009-11-20
+&kde; 4.4
+
+
+KDE
+Systemsettings
+Konqueror
+Cache
+
+
+
+This module allows you to control the size of the local cache
+folder used by &konqueror;. Note that each user account on your
+computer has a separate cache folder, and this folder is not
+shared with other web browsers such as &Netscape;.
+
+Storing local copies of web pages that you have visited allows
+&konqueror; to quickly load their contents on subsequent visits. It
+will only be necessary to reload the contents from the original site
+if they have changed since your last visit, or if you click the reload
+button in &konqueror;.
+
+If you really do not want any of the web pages you visit to be
+stored on your computer, you can disable &konqueror;'s disk cache by
+clearing the checkbox labeled Use cache.
+
+You can set here how aggressively &konqueror; keeps the cache up
+to date. Keep cache in sync means that &konqueror;
+will hit the cache for all objects, downloading them if they are not
+there, and then display the item from the cache. Use cache
+whenever possible means that &konqueror; will try the cache,
+and if an object is not there, it will directly download it for display.
+Offline browsing mode means that &konqueror; will
+try the cache, and if an object is not there, it will not attempt to
+download it from the Internet.
+
+You can control the size of the cache by typing a number into the
+text box labeled Disk cache size. This is the
+average amount of space in kilobytes that the cache folder is allowed
+to use. When the cache grows too large, &konqueror; will delete older
+files to reduce the size of the cache folder.
+
+This is however, only an average, and during a browsing session
+the cache could become substantially larger.
+
+You can use the Clear Cache button to empty
+the cache at any time.
+
+
diff --git a/doc/kcontrol/componentchooser/CMakeLists.txt b/doc/kcontrol/componentchooser/CMakeLists.txt
new file mode 100644
index 00000000..9164b121
--- /dev/null
+++ b/doc/kcontrol/componentchooser/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/componentchooser)
diff --git a/doc/kcontrol/componentchooser/index.docbook b/doc/kcontrol/componentchooser/index.docbook
new file mode 100644
index 00000000..4e353603
--- /dev/null
+++ b/doc/kcontrol/componentchooser/index.docbook
@@ -0,0 +1,68 @@
+
+
+
+]>
+
+
+
+
+Default Applications
+
+BurkhardLück
+lueck@hube-lueck.de
+
+
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+component
+
+
+
+In this module you can change &kde; default components.
+
+Components are programs that handle basic tasks, like the terminal emulator, the text
+editor and the email client. Different &kde; applications sometimes need to
+invoke a console emulator, send a mail or display some text.
+
+To do so consistently, these applications always call the same components. Here you
+can select which programs these components are.
+
+The list on the left shows the configurable component types:
+
+
+Email Client
+
+
+Embedded Text Editor
+
+
+File Manager
+
+
+Instant Messenger
+
+
+Terminal Emulator
+
+
+Web Browser
+
+
+Window Manager
+
+
+
+ Click the component you want to configure. In the right part of the dialog then all available
+applications for this service are displayed and you are able to select your favorite terminal emulator, text
+editor and the email client &etc;
+
+
diff --git a/doc/kcontrol/cookies/CMakeLists.txt b/doc/kcontrol/cookies/CMakeLists.txt
new file mode 100644
index 00000000..88fac298
--- /dev/null
+++ b/doc/kcontrol/cookies/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/cookies)
diff --git a/doc/kcontrol/cookies/index.docbook b/doc/kcontrol/cookies/index.docbook
new file mode 100644
index 00000000..cd817332
--- /dev/null
+++ b/doc/kcontrol/cookies/index.docbook
@@ -0,0 +1,208 @@
+
+
+
+]>
+
+
+
+Cookies
+
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+&Jost.Schenck; &Jost.Schenck.mail;
+
+
+
+2012-11-11
+&kde; 4.10
+
+
+KDE
+Systemsettings
+cookie
+
+
+
+
+
+Cookies
+
+Cookies are a mechanism used by web sites to store and retrieve
+information using your browser. For example, a web site may allow you
+to customize the content and layout of the pages you see, so that your
+choices are persistent across different visits to that web site.
+
+The web site is able to remember your preferences by storing a
+cookie on your computer. Then, on future visits, the web site retrieves
+the information stored in the cookie to format the content of the site
+according to your previously specified preferences.
+
+Thus, cookies play a very useful role in web browsing.
+Unfortunately, web sites often store and retrieve information in cookies
+without your explicit knowledge or consent. Some of this information may
+be quite useful to the web site owners, for example, by allowing them to
+collect summary statistics on the number of visits different areas of
+the web sites get, or to customize banner advertising.
+
+The cookies page allows you to set policies
+for the use of cookies when you are browsing the web with the
+&konqueror; web browser.
+
+Note that the policies that you set using this control
+module will not apply to other web browsers such
+as &Netscape;.
+
+
+
+Policy
+
+Using the Policy tab, you can configure the
+&kde; applications that will handle cookies. You can do this by specifying a
+general cookie policy as well as special cookie policies for certain
+domains or hosts.
+
+The top of the policy tab has a check box labeled Enable
+cookies. If you leave this unchecked, cookies will be
+completely disabled. However, this may make browsing rather
+inconvenient, especially as some web sites require the use of browsers
+with cookies enabled.
+
+You will probably want to enable cookies and then set
+specific policies on how you want them to be handled.
+
+The first group of options create settings that apply to all cookies.
+
+
+
+Only accept cookies from originating server
+
+Some pages try to set cookies from servers other than the one
+you are seeing the &HTML; page from. For example,
+they show you advertisements, and the advertisements are from another
+computer, often one that belongs to a large advertising group. These
+advertisements may try to set a cookie which would allow them to
+track the pages you view across multiple web sites.
+Enabling this option will mean only cookies that come from the
+same web server as you are explicitly connecting to will be
+accepted.
+
+
+
+Automatically accept session cookies
+
+
+An increasingly common use for cookies is not to track your
+movements across many visits to a web site, but to just follow what you
+do during one single visit. Session cookies are saved as long as you
+are looking at the site, and deleted when you leave it.
+
+Web sites can use this information for various things, most
+commonly it is a convenience so that you do not have to keep logging in
+to view pages. For example, on a webmail site, without some kind of
+session ID, you would have to give your password
+again for each email you want to read. There are other ways to
+achieve this, but cookies are simple and very common.
+
+Enabling this option means that session cookies are always
+accepted, even if you don't accept any other kind, and even if you
+choose to reject cookies from a particular site, session cookies from
+that site will be accepted.
+
+
+
+
+The section for Default Policy sets some
+further options that are mutually exclusive — you can choose only one
+of these options as the default, but you are free to set a different
+option for any specific web server.
+Site specific policies always take precedence over the default
+policy.
+
+
+
+Accept all cookies
+
+If this option is selected, all cookies will be accepted without
+asking for confirmation.
+
+
+
+Accept until end of session
+
+Cookies will be accepted, but they will expire at the end
+of the session.
+
+
+
+Ask for confirmation
+
+If this option is selected, you will be asked for confirmation
+every time a cookie is stored or retrieved. You can selectively accept
+or reject each cookie. The confirmation dialog will also allow you to
+set a domain specific policy, if you do not want to confirm each
+cookie for that domain.
+
+
+
+Reject all cookies
+
+If this option is selected, all cookies will be rejected without
+asking for confirmation.
+
+
+
+
+In addition to the default policy for handling of cookies, which you can
+set by selecting one of the three options described above, you can also set
+policies for specific host domains using the controls in the Site
+Policy group.
+
+The Ask, Accept, Accept until end of session, or Reject policy can be applied to a specific
+domain by clicking on the New... button, which
+brings up a dialog. In this dialog, you can type the name of the
+domain (with a leading dot), then select the policy you want to apply
+to this domain. Note that entries may also get added while you are
+browsing, if the default policy is to ask for confirmation, and you
+choose a general policy for a specific host (for example, by selecting
+Reject when asked to
+confirm a cookie).
+
+You can also select a specific host domain from the list and click the
+Change button to choose a different policy for that
+domain than the one shown in the list.
+
+To delete a domain specific policy, choose a domain from the list, and
+then click the Delete button. The default policy will
+apply to domains which have been deleted from the list.
+
+
+
+
+Management
+
+In the Management tab you can browse and selectively
+delete cookies that have been set in the past.
+
+In the upper part of this dialog, you can see a list of domains displayed
+ as a tree. Click on the little > next to a domain to see all
+cookies that have been set for this particular target domain. If you select one
+of these cookies, you will notice that its contents will show up in the frame
+Details below.
+
+By clicking the Delete button you can now delete the selected
+cookie. Click Delete All to delete all cookies stored.
+
+If a domain is selected, you can use Configure Policy to set
+a site policy.
+
+Choose Reload List to reload the list
+from your hard disk. You might want to do this if you have had the
+module open and are testing web sites, or have made many changes in the
+module itself.
+
+
+
+
+
+
diff --git a/doc/kcontrol/ebrowsing/CMakeLists.txt b/doc/kcontrol/ebrowsing/CMakeLists.txt
new file mode 100644
index 00000000..2bdd4b02
--- /dev/null
+++ b/doc/kcontrol/ebrowsing/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/ebrowsing)
diff --git a/doc/kcontrol/ebrowsing/index.docbook b/doc/kcontrol/ebrowsing/index.docbook
new file mode 100644
index 00000000..63e6f693
--- /dev/null
+++ b/doc/kcontrol/ebrowsing/index.docbook
@@ -0,0 +1,173 @@
+
+
+
+]>
+
+
+
+Web Shortcuts
+
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+&Yves.Arrouye; &Yves.Arrouye.mail;
+
+
+
+2013-05-30
+&kde; 4.11
+
+
+KDE
+Systemsettings
+enhanced browsing
+web shortcuts
+browsing
+
+
+
+
+
+Web Shortcuts
+
+
+
+Introduction
+
+&konqueror; offers some features to enhance your browsing
+experience. One such feature is Web Shortcuts.
+
+You may already have noticed that &kde; is very Internet friendly.
+For example, you can click on the Run menu
+item or type the keyboard shortcut assigned to that command (&Alt;F2,
+unless you have changed it) and type in a &URI;.
+Uniform Resource Identifier. A standardized way of
+referring to a resource such as a file on your computer, a World Wide
+Web address, an email address,
+etc....
+
+Web shortcuts, on the other hand, let you come up with new pseudo
+&URL; schemes, or shortcuts, that basically let you
+parameterize commonly used
+&URI;s. For example, if you like the Google search
+engine, you can configure &kde; so that a pseudo &URL;
+scheme like gg will trigger a search on
+Google. This way, typing gg:my
+query will search for my
+query on Google.
+
+One can see why we call these pseudo &URL;
+schemes. They are used like a &URL; scheme, but the
+input is not properly &URL; encoded, so one will type
+google:kde apps and not
+google:kde+apps.
+
+You can use web
+shortcuts wherever you would normally use
+&URI;s. Shortcuts for several search engines should
+already be configured on your system, but you can add new keywords, and
+change or delete existing ones in this module.
+
+
+
+
+
+Web Shortcuts
+
+The descriptive names of defined web shortcuts are shown in a
+list box. As with other lists in &kde;, you can click on a column
+heading to toggle the sort order between ascending and
+descending, and you can resize the columns.
+
+At the bottom of the list the option Enable Web shortcuts
+has to be checked to enable this feature. Use the buttons on the right to
+create, modify or delete shortcuts.
+
+If Use preferred shortcuts only is checked, only
+web shortcuts marked as preferred in the third column of the list
+are used in places where only a few select
+shortcuts can be shown at one time.
+
+
+Below the list you find two additional options:
+
+Default Web shortcuts
+
+Select the search engine to use for input boxes that provide automatic
+lookup services when you type in normal words and phrases instead of a &URL;.
+To disable this feature select None from the list.
+
+
+Keyword delimiter
+
+Choose the delimiter that separates the keyword from the phrase or word to
+be searched.
+
+
+
+If you double-click on a specific entry in the list of defined
+search providers or click the Change button,
+the details for that entry are shown in a popup
+dialog. In addition to the descriptive name for the item, you can
+also see the &URI; which is used, as well as the
+associated shortcuts which you can type anywhere in &kde; where
+&URI;s are expected. A given search provider can have
+multiple shortcuts, each separated by a comma.
+
+ The text boxes are used not only for displaying information
+about an item in the list of web shortcuts, but also for modifying or
+adding new items.
+
+You can change the contents of either the Shortcut
+URL or the Shortcuts text box.
+Click OK to save your changes or
+Cancel to exit the dialog with no
+changes.
+
+If you examine the contents of the Shortcuts
+URL text box, you will find that most, if not all of the
+entries have a in them. This sequence of four
+characters acts as a parameter, which is to say that they are replaced
+by whatever you happen to type after the colon character that is
+between a shortcut and its parameter. To add this query placeholder
+to a shortcuts url, click on the button at the right of the text box.
+Let's consider some examples to clarify how to use web shortcuts.
+
+Suppose that the &URI; is
+http://www.google.com/search?q=\{@}, and
+gg is a shortcut to this
+&URI;. Then, typing
+gg:alpha is
+equivalent to
+http://www.google.com/search?q=alpha.
+You could type anything after the : character;
+whatever you have typed simply replaces the
+characters, after being converted to the appropriate character set for
+the search provider and then properly
+&URL;-encoded. Only the part of
+the search &URI; is touched, the rest of it is
+supposed to be properly &URL;-encoded already and is
+left as is.
+
+You can also have shortcuts without parameters. Suppose the
+&URI; was
+file:/home/me/mydocs/calligra/words and the
+shortcut was mywords. Then, typing
+mywords: is the same as typing the complete
+&URI;. Note that there is nothing after the colon
+when typing the shortcut, but the colon is still required in order for
+the shortcut to be recognized as such.
+
+By now, you will have understood that even though these shortcuts
+are called web shortcuts, they really are shortcuts to parameterized
+&URI;s, which can point not only to web sites like
+search engines but also to anything else that can be pointed to by a
+&URI;. Web shortcuts are a very powerful feature of
+navigation in &kde;.
+
+
+
+
+
+
diff --git a/doc/kcontrol/emoticons/CMakeLists.txt b/doc/kcontrol/emoticons/CMakeLists.txt
new file mode 100644
index 00000000..c8a3d7aa
--- /dev/null
+++ b/doc/kcontrol/emoticons/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+#
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/emoticons)
diff --git a/doc/kcontrol/emoticons/emoticons.png b/doc/kcontrol/emoticons/emoticons.png
new file mode 100644
index 00000000..9c467272
Binary files /dev/null and b/doc/kcontrol/emoticons/emoticons.png differ
diff --git a/doc/kcontrol/emoticons/index.docbook b/doc/kcontrol/emoticons/index.docbook
new file mode 100644
index 00000000..c5283b1f
--- /dev/null
+++ b/doc/kcontrol/emoticons/index.docbook
@@ -0,0 +1,168 @@
+
+
+
+]>
+
+
+Emoticons
+
+&Anne-Marie.Mahfouf;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+System Settings
+emoticons
+KCMEmoticons
+
+
+
+
+Emoticons Themes Manager
+
+Introduction
+
+
+
+Screenshot of the Emoticons Theme Manager
+
+
+
+
+
+ The Emoticons Theme Manager
+
+
+
+
+
+Emoticons can be used in several &kde; applications: &kopete;, &konversation;, &kmail;... This module offers you to easily manage your emoticons sets. You can:
+
+
+add emoticons themes
+remove emoticons themes
+install an existing theme
+add, remove or edit emoticons within a theme
+
+
+Please note that you will set emoticons themes per application.
+
+
+The module is separated in two parts: on the left you can manage your themes and on the right you can manage emoticons within themes.
+
+
+
+An emoticon consists in two parts: an icon (typically a .png, .mng or .gif picture) and a text describing the emoticon. The text can be some ASCII symbols like ]:-> or the emoticon short description enclosed within * like *FRIEND*. The user types the symbol or the text and the emoticon icon replaces it.
+
+
+
+The emoticons themes will be saved locally in your home in $KDEHOME/share/emoticons.
+
+
+
+
+
+Emoticons Themes
+
+
+This section allows you to manage emoticons themes.
+
+
+
+Require spaces around emoticons
+
+
+When this option is checked, you need to separate the emoticon with a white space before and after it so it is changed to an icon. If you type "Hello:-)" then this string will stay as it is while if you type "Hello :-)" you will get "Hello" followed by the :-) emoticon.
+
+
+When this option is not checked (default), each emoticon string will be replaced by its icon.
+
+
+
+
+New Theme...
+
+
+You can create your own new theme from scratch. Clicking on this button brings a dialog asking for the name of the new theme. You can then use the Add... button on the right to create new emoticons and their associated text.
+
+
+
+Get New Icon Themes...
+
+
+You need to be connected to the Internet to use this action. A dialog displays a list of emoticons themes from http://www.kde-look.org and you can install one by clicking the Install button on the right side of the theme description in the list.
+
+
+
+Install Theme File...
+
+
+This action allows you to install a theme you downloaded yourself. A theme file is an archive file, usually a .tar.gz or a .zip file or any other archive files. A dialog asks you for the location of this local archive file and after you entered or dragged the URL and clicked OK, the theme is installed and will appear in the themes list.
+
+
+
+Remove Theme
+
+
+This action will remove the selected theme from your disk. Select the theme you want to remove in the list. Click the Remove Theme button. This theme will be removed from the disk if you click Apply.
+
+
+
+
+
+
+
+
+Emoticons Management
+
+
+This section allows you to manage emoticons within the selected theme. The list on the right displays all emoticons of the selected theme. You can add, edit or remove any emoticon. Select a theme in the list on the left and then select the action you want to perform.
+
+
+
+Add...
+
+
+This button allows you to add an emoticon to the selected theme. The dialog asks you to choose an icon for your emoticon and to enter the corresponding ASCII symbol or text attached to it. After that, clicking OK will add your new emoticon in the emoticon list, you will see the icon and the corresponding text displayed. If you want to modify either the icon or the text, you can use the Edit... button described below.
+
+
+
+
+Edit...
+
+
+The Edit... button allows you to change either the icon or the text of the selected emoticon. You need to click the OK button to validate this action.
+
+
+
+Remove
+
+
+This will remove the selected emoticon from the selected theme. You need to click the Yes button to validate this action.
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/filemanager/CMakeLists.txt b/doc/kcontrol/filemanager/CMakeLists.txt
new file mode 100644
index 00000000..65689b05
--- /dev/null
+++ b/doc/kcontrol/filemanager/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/filemanager)
diff --git a/doc/kcontrol/filemanager/index.docbook b/doc/kcontrol/filemanager/index.docbook
new file mode 100644
index 00000000..0f638d54
--- /dev/null
+++ b/doc/kcontrol/filemanager/index.docbook
@@ -0,0 +1,61 @@
+
+
+
+]>
+
+
+
+File Management
+
+&Mike.McBride; &Mike.McBride.mail;
+
+
+
+2009-12-18
+&kde; 4.4
+
+
+KDE
+Systemsettings
+file manager
+
+
+
+In these modules, you can configure various aspects of
+&konqueror;'s file manager functionality.
+
+&konqueror;'s web browser functionality has its own configuration
+modules.
+
+
+Misc Options
+
+Open folders in separate windows
+If this option is checked, a new
+&konqueror; window will be created when you open a
+folder, rather than simply showing that folder's contents in the
+ current
+window.
+
+
+
+Show 'Delete' menu entries which
+bypass the trashcan
+
+Check this if you want Delete menu commands to be
+displayed on the desktop and in the file manager's context menus.
+You can always delete files by holding the &Shift; key while calling
+Move to Trash.
+
+
+
+
+The settings for &konqueror;'s file manager mode on the View Modes,
+Navigation, Services, General
+and Trash pages are used by &dolphin; as well.
+
+
+
diff --git a/doc/kcontrol/filetypes/CMakeLists.txt b/doc/kcontrol/filetypes/CMakeLists.txt
new file mode 100644
index 00000000..e12793e3
--- /dev/null
+++ b/doc/kcontrol/filetypes/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/filetypes)
diff --git a/doc/kcontrol/filetypes/index.docbook b/doc/kcontrol/filetypes/index.docbook
new file mode 100644
index 00000000..36a31291
--- /dev/null
+++ b/doc/kcontrol/filetypes/index.docbook
@@ -0,0 +1,367 @@
+
+Calligra Words">
+
+
+]>
+
+
+
+
+File Associations
+
+&Mike.McBride; &Mike.McBride.mail;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+files association
+association
+
+
+
+File Associations
+
+
+Introduction
+
+One of the most convenient aspects of &kde;, is its ability to
+automatically match a data file with its application. As an example,
+when you click on your favorite &calligrawords; document in the filemanager, &kde;
+automatically starts &calligrawords;, and automatically loads that file into
+&calligrawords; so you can begin working on it.
+
+In the example above, the &calligrawords; Data file is
+associated with &calligrawords; (the application). These
+file associations are crucial to the functioning of &kde;.
+
+When &kde; is installed, it automatically creates hundreds of file
+associations to many of the most common data types. These initial
+associations are based on the most commonly included software, and the
+most common user preferences.
+
+Unfortunately, &kde; can not:
+
+
+predict every possible combination of software and data files
+prepare for file formats not yet invented
+or predict everyone's favorite application for certain file formats
+
+
+You can change your current file associations or add new file
+associations using this module.
+
+Each file association is recorded as a mime type.
+&MIME; stands for Multipurpose Internet Mail
+Extensions. It allows a computer to determine the type of file,
+without opening and analyzing the format of each and every file.
+
+
+
+
+How to use this module
+
+You can start this module
+by opening &systemsettings; and selecting File Associations in the
+Common Appearance and Behavior category. Alternatively, you can start it by
+typing kcmshell4 filetypes from the terminal or &krunner;.
+
+The file associations are organized into several categories, and
+at a minimum you will have:
+
+
+Application
+Audio
+Image
+Inode
+Message
+Multipart
+Text
+Video
+
+
+All of the file associations are sorted into one of these
+categories.
+
+There is no functional difference between any of the
+categories. These categories are designed to help organize your file
+associations, but they do not alter the associations in any way.
+
+
+The categories are listed in the box labeled Known
+Types.
+
+You can explore each of these categories, and see the file
+associations contained within each one, by simply double-clicking on the
+category name. You will be presented with a list of the associated
+mime-types under that category.
+
+You can also search for a particular &MIME; type by using the
+search box. The search box is labeled Find file type or filename
+pattern and is located above the category list.
+
+Simply type the first letter of the &MIME; type you are interested
+in. The categories are automatically expanded, and only the mime-types
+that include that letter are displayed.
+
+You can then enter a second character and the mime-types will be
+further limited to mime types containing those two
+characters.
+
+
+Adding a new mime type
+
+If you want to add a new &MIME; type to your file associations,
+you can click on the Add... button. A small
+dialog box will appear. You select the category from the drop down
+box labeled Group, and type the &MIME; name in the blank labeled Type
+name. Click OK to add the new mime
+type, or click Cancel to not add any new
+mime-types.
+
+
+
+
+Removing a mime type
+
+If you want to remove a &MIME; type, simply select the &MIME;
+type you want to delete by clicking once with the mouse on the &MIME;
+type name. Then click the button labeled
+Remove. The &MIME; type will be deleted
+immediately.
+
+
+
+
+Editing a mime types properties
+
+Before you can edit a &MIME; types property, you must first
+specify which &MIME; type. Simply browse through the categories until
+you find the &MIME; type you want to edit, then click once on it with
+the mouse.
+
+As soon as you have selected the &MIME; type, the current values of
+the &MIME; type will appear in the module window.
+
+You will notice the current values are split into two tabs:
+General and Embedding
+
+
+
+General
+
+There are 4 properties for each &MIME; type in this tab:
+
+
+Mime Type Icon is the icon that
+will be visible when using &dolphin; or &konqueror; as a file
+manager.
+Filename Patterns is a search
+pattern which &kde; will use to determine the &MIME; type.
+Description is a short description
+of the file type. This is for your benefit only.
+Application Preference Order
+determines which applications will be associated with the specified
+&MIME; type.
+
+
+
+
+
+Embedding Tab
+
+The Embedding tab allows you to determine if a file will be
+viewed within a filemanager window, or by starting the
+application.
+
+
+
+
+
+
+
+Changing the Icon
+
+To change the icon, simply click on the Icon button. A dialog box
+will appear, which will show you all available icons. Simply click once
+with the mouse on the icon of your choice, and click
+OK.
+
+
+
+
+Editing the mime-type patterns
+
+The box labeled Filename Patterns, determines
+what files will be included within this mime-type.
+
+Usually, files are selected based on their suffix. (Examples:
+Files that end with .wav are sound
+files, using the WAV format and files that end in .c are program files written in C).
+
+You should enter your filename mask in this combo box.
+
+The asterisk (*) is a wildcard character that
+will be used with nearly every mime type mask. A complete discussion
+of wildcards is beyond the scope of this manual, but it is important
+to understand that the asterisk (in this context),
+matches any number of characters. As an example:
+*.pdf will match
+Datafile.pdf, Graphics.pdf
+and User.pdf, but not PDF,
+Datafile.PDF, or
+.pdf.
+
+It is very beneficial to have multiple masks. One for lower
+case, one for upper case, &etc; This will help ensure that &kde; can
+determine the file type more accurately.
+
+
+
+
+Editing a mime types description.
+
+You can type a short description of the &MIME; type in the text
+box labeled Description. This label is to help
+you, it does not affect the function of the &MIME; type.
+
+
+
+
+Editing the application associations
+
+There are five buttons (Move Up,
+Move Down, Add, Edit and
+Remove) and a list box (which lists the
+applications) which are used to configure the applications.
+
+The list box lists all of the applications associated with a
+specific &MIME; type. The list is in a specific order. The top
+application is the first application tried. The next application down
+the list is the second, &etc;
+
+What do you mean there is more than one application per
+&MIME; type? Why is this necessary?
+
+We started out by saying that &kde; comes preconfigured with
+hundreds of file associations. The reality is, each system that &kde;
+is installed on has a different selection of applications. By
+allowing multiple associations per &MIME; type, &kde; can continue to
+operate when a certain application is not installed on the
+system.
+
+As an example:
+For the &MIME; type pdf, there are two
+applications associated with this file type. The first program is
+called &okular;. If your system does not
+have &okular; installed, then &kde;
+automatically starts the second application &krita;.
+As you can see, this will help keep &kde; running
+strong as you add and subtract applications.
+
+We have established that the order is important. You can change
+the order of the applications by clicking once with the mouse on the
+application you want to move, and then clicking either Move
+Up or Move Down. This will shift
+the currently selected application up or down the list of
+applications.
+
+You can add new applications to the list by clicking the button
+labeled Add. A dialog box will appear. Using the
+dialog box, you can select the application you want to use for this mime
+type. Click OK when you are done, and the
+application will be added to the current list.
+
+To change the options of an application for a particular &MIME; type
+select it in the list and then press the Edit... button.
+This opens a new dialog with General,
+Permissions, Applications and
+Preview tabs.
+On the Applications tab you can edit Name,
+Description and Comment.
+In the Command field you can have several place holders
+following the command, which will be replaced with the actual values
+when the actual program is run:
+
+%f - a single file name
+%F - a list of files; use for applications that can open several local files
+at once
+%u - a single URL
+%U - a list of URLs
+%d - the folder of the file to open
+%D - a list of folders
+%i - the icon
+%m - the mini-icon
+%c - the caption
+
+
+You can remove an application (thereby ensuring that the
+application will never run with this &MIME; type by clicking once on the
+name of the application, and clicking the Remove
+button.
+
+It is a good idea to use the Move Up
+and Move Down buttons to adjust the unwanted
+application to a lower position in the list, rather than deleting the
+application from the list entirely. Once you have deleted an
+application, if your preferred application should become compromised,
+there will not be an application to view the data document.
+
+
+
+
+Embedding
+These settings are valid only for &konqueror; used as file manager, &dolphin;
+is not able to use embedded views and opens a file always in the associated application.
+By clicking on the Embedding tab, you are
+presented with four radio buttons in the Left click
+action group. These determine how the filemanager views the selected
+&MIME; type:
+
+
+Show file in embedded viewer
+If this is selected, the file will be shown within the filemanager window.
+Show file in separate viewer
+This will cause a separate window to be created when showing this mime-type.
+Use settings for 'application' group
+This will cause the mime-type to use the settings for the mime-type group.
+(if you are editing an audio mime type, then the settings for the audio group are used).
+Ask whether to save to disk instead
+This setting applies only to &konqueror; in browser mode and determines
+if the file is shown in an embedded viewer or if you are asked to save the file to disk instead.
+
+
+Below this is a listbox labeled Services Preference
+Order.
+
+When you use a filemanager like &dolphin; or &konqueror;, you can
+right mouse click, and a menu will with an
+entry labeled Open with... will appear. This box
+lists the applications that will appear, in the order they will
+appear, under this menu.
+
+You can use the Move Up and
+Move Down buttons to change the order.
+
+
+
+
+Making changes permanent
+
+When you are done making any changes to mime types, you can click
+Apply to make your changes permanent, but keep
+you in this module.
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/history/CMakeLists.txt b/doc/kcontrol/history/CMakeLists.txt
new file mode 100644
index 00000000..fcd8d597
--- /dev/null
+++ b/doc/kcontrol/history/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/history)
diff --git a/doc/kcontrol/history/index.docbook b/doc/kcontrol/history/index.docbook
new file mode 100644
index 00000000..ffc074d4
--- /dev/null
+++ b/doc/kcontrol/history/index.docbook
@@ -0,0 +1,62 @@
+
+
+
+]>
+
+History Sidebar
+
+
+&Burkhard.Lueck;
+
+
+
+2009-11-24
+&kde; 4.4
+
+
+KDE
+Systemsettings
+history
+
+
+
+
+This dialog allows you to configure the history sidebar.
+
+
+
+Limits
+
+The options in this section can be used to set the maximum size of your history and set a time after which
+items are automatically removed.
+
+
+
+
+Custom Font
+
+Here you can also set different fonts for new and
+old &URL;s by selecting the Choose Font button.
+
+
+
+
+Details
+
+The Detailed tooltips check box controls how much
+information is displayed when you hover the mouse pointer over an item in the
+history page.
+If checked the number of times visited and the dates of the first and last
+visits are shown, in addition to the URL.
+
+
+
+
+Selecting Clear History will
+clear out the entire history.
+
+
diff --git a/doc/kcontrol/icons/CMakeLists.txt b/doc/kcontrol/icons/CMakeLists.txt
new file mode 100644
index 00000000..9629f320
--- /dev/null
+++ b/doc/kcontrol/icons/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/icons)
diff --git a/doc/kcontrol/icons/delete-theme.png b/doc/kcontrol/icons/delete-theme.png
new file mode 100644
index 00000000..8421b7e5
Binary files /dev/null and b/doc/kcontrol/icons/delete-theme.png differ
diff --git a/doc/kcontrol/icons/effects.png b/doc/kcontrol/icons/effects.png
new file mode 100644
index 00000000..78f27292
Binary files /dev/null and b/doc/kcontrol/icons/effects.png differ
diff --git a/doc/kcontrol/icons/get-new-theme.png b/doc/kcontrol/icons/get-new-theme.png
new file mode 100644
index 00000000..a6ba6fe7
Binary files /dev/null and b/doc/kcontrol/icons/get-new-theme.png differ
diff --git a/doc/kcontrol/icons/index.docbook b/doc/kcontrol/icons/index.docbook
new file mode 100644
index 00000000..eaec490e
--- /dev/null
+++ b/doc/kcontrol/icons/index.docbook
@@ -0,0 +1,354 @@
+
+
+
+]>
+
+
+
+Icons
+
+&Mike.McBride; &Mike.McBride.mail;
+&Jost.Schenck; &Jost.Schenck.mail;
+&Anne-Marie.Mahfouf; &Anne-Marie.Mahfouf.mail;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+KControl
+icon
+
+
+
+Icons
+
+
+Introduction
+
+&kde; comes with a full set of icons in several sizes. These icons
+are being used all over &kde;: the desktop, the panel, the &konqueror; file
+manager, in every toolbar of every &kde; application, etc. The icons
+control module offers you very flexible ways of customizing the way &kde;
+handles icons.
+
+
+
+Here's a screenshot of the icon theme manager
+
+
+
+
+
+ Customizing &kde; icons
+
+
+
+
+
+In this module you can:
+
+install and choose icon themes
+choose different icon sizes
+assign effects to icons (for example make them
+semi-transparent or colorize them)
+configure these settings for each of the different places
+icons will be used in: for example the desktop, toolbars &etc;
+
+
+
+Please note that some of these settings may depend on
+your selected icon theme. &kde; comes with three icon themes by default,
+Oxygen, Monochrome and Crystal SVG. There are additional color themes
+in the kdeartwork package.
+
+There are two pages in this module: Theme and Advanced. Theme manages the icon themes while Advanced lets you configure how icons will be used in &kde;.
+
+
+
+Theme
+
+At the top is a preview of the current theme icons. Most default
+installations will have only one icon theme available, the &kde; default
+Oxygen theme. There are other themes contained separately in the
+kdeartwork package, and you can also download more from the Internet from http://www.kde-look.org.
+
+
+Get New Themes...
+
+
+You need to be connected to the Internet to use it. Clicking on this button will display a dialog where you can choose a new icon theme. Clicking on Install in the dialog will install the chosen icon theme and after you Close the installer your new theme is immediately available.
+
+
+
+Get New Icon Themes
+
+
+
+
+
+ Get New Icon Themes
+
+
+
+
+
+
+Install Theme File...
+
+
+If you dowloaded new themes from the internet, you can use this to browse to the
+location of those newly downloaded themes. Clicking on this button will bring you a small dialog to point to the icon theme tarball you have on your disk.
+
+
+Installing A New Icon Theme
+
+
+
+
+
+ Installing A New Icon Theme
+
+
+
+
+Clicking OK in this dialog will install the theme you pointed to and make it available in the theme list.
+
+
+
+Remove Theme
+
+
+Clicking this button will remove all files for this theme from your system. A confirmation message is displayed and will ask you if you are really sure you want to remove all the files for this theme.
+
+
+
+Removing A Theme
+
+
+
+
+
+ Removing A Theme
+
+
+
+
+Clicking Delete will remove the theme files and clicking Cancel will not delete anything and will cancel the remove action.
+
+
+
+
+
+
+
+
+Advanced
+
+Looking at this second page of the icons control module, you
+will see two areas:
+
+
+
+An area labelled Use of Icon. Here you can
+choose which particular usage of icons you want to configure, for
+example Toolbar or Panel.
+
+
+
+Choosing the icons to configure
+
+
+
+
+
+ Choosing the icons to configure
+
+
+
+
+
+
+A preview area where you can see how
+icons of the selected kind will look using the current
+settings. Note that the state of this preview also depends on the icon
+state selected in the effects below (do not worry
+about that now, we will explain that below).
+
+
+When you want to configure icons, first select the usage of icons
+you want to configure. Change the settings until you like the
+preview. You can then choose a different icon usage and configure
+that. At the end, if you are satisfied with your settings, click
+OK or Apply to take the
+changes in effect.
+
+There are two further options to consider,
+Size and Effects.
+
+
+Icon Size
+
+
+
+Setting icons sizes
+
+
+
+
+
+ Setting icons sizes
+
+
+
+
+
+You can choose
+from a list of icon sizes. The largest icon sizes are especially useful
+for visually impaired people.
+
+Which sizes will be offered by the icon size listbox depends on
+the icon theme you have selected in the icon themes control module. For
+example, the low color icon theme only offers the sizes 16 and 32 for
+desktop icons and 16, 22 and 32 for toolbar icons. The HiColor theme
+offers icon sizes 16, 32 and 48 as well as sizes from 64 to 128.
+However, as &kde; can not have all these icon sizes in store, icons
+using size 64 to 128 will be automatically generated which may result in
+a loss of quality.
+
+
+
+You can also choose animated icons. Many of the icons have
+animations associated with them. Enable the checkbox labelled
+Animate Icons, to enable this effect, but note
+that it may appear slow or jerky if your graphics card is old or you
+are low on memory.
+
+
+
+
+Effects
+
+
+Setting icons effects
+
+
+
+
+
+ Setting icons effects
+
+
+
+
+
+Finally you can configure certain filters to be
+applied on icons which are in one of three states:
+
+
+
+Default
+This is how the icon will look normally.
+
+
+Active:
+This is how the icon will look when the mouse cursor is over the icon.
+
+
+Disabled:
+This is how the icon will look if its corresponding action is
+disabled, &ie; clicking on it will not lead to any
+result.
+
+
+
+Select one of these states, and press the Set
+Effect... button to configure a corresponding icon effect.
+Please note that this configuration will only affect icons of the
+currently selected Use of Icon category (see
+above): configuring an effect for active icons, while
+Toolbar icon usage is selected, will
+not affect active icons used in other
+places.
+
+Below the list of icon states there are two options: you can
+configure an effect and you can select the
+Semi-transparent option, which will make the
+background shine through the icon. To the right of the
+effects list box there is a slider button to pass additional parameters to
+a filter for colours and Amount.
+
+
+The following effects can be applied to icons:
+
+
+
+No Effect:
+Icons will be used without applying any
+effect.
+
+
+To Gray:
+This filter will apply a grayish look to the icon. Use the
+Amount slider to configure the intensity of this filter. Note
+that it is customary for most user interfaces to use this effect for disabled
+icons only.
+
+
+Colorize:
+Icons will be colorized using a custom color. For example, you
+may configure active icons (&ie; the icon the mouse cursor is over) to
+shine golden. Use the color buttons and the Amount slider
+to configure the used color and the intensity of the colorization.
+
+
+Gamma:
+A different gamma value will be applied to all icons. If you're
+no photographer and don't know what Gamma is: it's quite similar to what people
+call contrast. Just play around with the gamma settings by moving the
+Amount slider to get a feeling for this
+effect.
+
+
+Desaturate:
+Icons will be drawn desaturated. This is quite similar to the
+Color setting on your television. Use the slider to configure
+the amount of desaturation.
+
+
+
+To Monochrome:
+
+Icons will be drawn using only the two colours selected.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/icons/install-theme.png b/doc/kcontrol/icons/install-theme.png
new file mode 100644
index 00000000..fbe5316d
Binary files /dev/null and b/doc/kcontrol/icons/install-theme.png differ
diff --git a/doc/kcontrol/icons/main.png b/doc/kcontrol/icons/main.png
new file mode 100644
index 00000000..bae9e469
Binary files /dev/null and b/doc/kcontrol/icons/main.png differ
diff --git a/doc/kcontrol/icons/size.png b/doc/kcontrol/icons/size.png
new file mode 100644
index 00000000..599c162b
Binary files /dev/null and b/doc/kcontrol/icons/size.png differ
diff --git a/doc/kcontrol/icons/use-of-icons.png b/doc/kcontrol/icons/use-of-icons.png
new file mode 100644
index 00000000..5132bcc9
Binary files /dev/null and b/doc/kcontrol/icons/use-of-icons.png differ
diff --git a/doc/kcontrol/kcm_ssl/CMakeLists.txt b/doc/kcontrol/kcm_ssl/CMakeLists.txt
new file mode 100644
index 00000000..ce2344b7
--- /dev/null
+++ b/doc/kcontrol/kcm_ssl/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/kcm_ssl)
diff --git a/doc/kcontrol/kcm_ssl/details.png b/doc/kcontrol/kcm_ssl/details.png
new file mode 100644
index 00000000..f4131b3a
Binary files /dev/null and b/doc/kcontrol/kcm_ssl/details.png differ
diff --git a/doc/kcontrol/kcm_ssl/index.docbook b/doc/kcontrol/kcm_ssl/index.docbook
new file mode 100644
index 00000000..f74d0cac
--- /dev/null
+++ b/doc/kcontrol/kcm_ssl/index.docbook
@@ -0,0 +1,134 @@
+
+
+
+]>
+
+SSL Versions and Certificates
+
+
+SubhashishPradhan
+&TC.Hollingsworth; &TC.Hollingsworth.mail;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+SSL
+certificates
+
+
+
+
+Introduction
+&kde; provides a list of all the X.509 certificates used by the system. They
+can be accessed in the SSL Preferences module in
+&systemsettings;.
+
+This module provides a categorized listing of all SSL versions and
+certificates. You can see the details of each of the certificates and add, delete,
+disable, or enable them.
+
+The certificates are categorized into System certificates
+and User-added certificates. The System
+certificates are further categorized by the organization that issued
+them.
+
+
+The SSL Versions and Certificates Module
+
+
+The SSL Versions and Certificates module.
+
+
+
+
+Viewing the Details of a Certificate
+
+Select a certificate under a listed organization, and click on the
+Display underneath the list to view the details of the
+certificate.
+
+
+Viewing the Details of a Certificate
+
+
+The certificate details window.
+
+
+
+
+
+
+Enabling or Disabling a Certificate
+
+First, select a certificate listed under an organization. Then, click the
+Enable button to enable the certificate, or click the
+Disable button to disable an enabled certificate.
+
+Alternatively, you can enable or disable a certificate by selecting or
+clearing the check box before the certificate.
+
+
+You can enable or disable multiple certificates by selecting them while
+holding the &Ctrl; key and then clicking on the Enable or
+Disable button below the list.
+
+
+
+
+
+Adding a Certificate
+
+
+First, click on the Add button below the certificate
+list. It will open the file selector dialog allowing you to locate where the
+certificate files are stored. After locating the certificate file, select it
+and click on the Open button to add it.
+
+
+The certificates must be in one of the following formats:
+DER, PEM, or &Netscape;-encoded X.509
+certificate.
+
+
+
+
+
+Removing a Certificate
+
+Select the listed certificate that you want to remove, and click the
+Remove button to remove the certificate.
+
+
+System certificates cannot be removed.
+
+
+
+
+
+Thanks and Acknowledgments
+
+Special thanks to Google Code-In 2011 participant Subhashish Pradhan for
+writing this article.
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/kcm_ssl/module.png b/doc/kcontrol/kcm_ssl/module.png
new file mode 100644
index 00000000..80253e23
Binary files /dev/null and b/doc/kcontrol/kcm_ssl/module.png differ
diff --git a/doc/kcontrol/kcmcgi/CMakeLists.txt b/doc/kcontrol/kcmcgi/CMakeLists.txt
new file mode 100644
index 00000000..44b16910
--- /dev/null
+++ b/doc/kcontrol/kcmcgi/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/kcmcgi)
diff --git a/doc/kcontrol/kcmcgi/index.docbook b/doc/kcontrol/kcmcgi/index.docbook
new file mode 100644
index 00000000..8958aca0
--- /dev/null
+++ b/doc/kcontrol/kcmcgi/index.docbook
@@ -0,0 +1,44 @@
+
+
+
+]>
+
+
+
+
+CGI Scripts
+
+BurkhardLück
+lueck@hube-lueck.de
+
+
+
+
+2009-11-20
+&kde; 4.4
+
+
+KDE
+Systemsettings
+cgi
+
+
+
+
+The CGI KIO slave lets you execute local CGI programs
+without the need to run a web server.
+
+In this system settings module you can
+configure the paths that are searched for CGI scripts.
+
+
+Paths to CGI scripts are displayed in the list box at the
+bottom of this dialog.
+
+
+Use the buttons below the list box to add or remove paths from the search.
+
+
+
diff --git a/doc/kcontrol/kcmcss/CMakeLists.txt b/doc/kcontrol/kcmcss/CMakeLists.txt
new file mode 100644
index 00000000..f2c5b585
--- /dev/null
+++ b/doc/kcontrol/kcmcss/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/kcmcss)
diff --git a/doc/kcontrol/kcmcss/index.docbook b/doc/kcontrol/kcmcss/index.docbook
new file mode 100644
index 00000000..050a72ab
--- /dev/null
+++ b/doc/kcontrol/kcmcss/index.docbook
@@ -0,0 +1,367 @@
+
+
+
+]>
+
+
+
+Appearance
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+
+
+2009-12-01
+&kde; 4.4
+
+
+KDE
+CSS
+Appearance
+Font
+CSS
+Stylesheets
+Accessibility
+
+
+
+
+
+Appearance
+This module consists of three tabs with configure options how to display web pages.
+
+
+General
+
+The check box labeled Automatically load
+images allows you to control whether images on web pages are
+loaded by default. Unless you have a very slow connection, you will
+probably want to leave this option selected, as there are many web pages
+that are difficult to use without images. If you don't select the option
+to automatically load images, you can still view the text on the page,
+and then load the images if you need them.
+
+If Draw frame around not completely loaded images
+is checked, &konqueror; will draw a frame as a placeholder
+around images embedded in a web page that are not yet fully loaded. You
+will probably want to check this box to enhance your browsing experience,
+especially if have a slow network connection.
+
+Many web pages use animated gif images, and these can be very
+annoying, and in some cases, quite a drain on your system resources.
+The Animations option lets you choose when
+animations are enabled. The default is enabled, but you can set this
+to disabled, or to run the animation only once, even if the file
+itself contains instructions that the animation should run more times,
+or continuously.
+
+The next setting is Underline links:. You can
+choose to underline links Enabled. If this option
+is selected, any text on web pages that acts as a link will be shown in
+an underlined font. While many web pages do use color to distinguish
+text that acts as a link, underlining makes it very easy to spot
+links.
+
+If you don't like underlined links, you can choose
+Disabled, so that no links are underlined. Or you
+can choose a middle ground, Only on Hover, so that links
+are underlined when the mouse cursor is resting over them, and not
+underlined the rest of the time.
+
+The site's CSS definitions can override this value.
+
+Smooth scrolling
+determines whether &konqueror; should use smooth steps to scroll &HTML;
+pages, or whole steps:
+
+Always: Always use smooth steps
+when scrolling.
+Never: Never use smooth scrolling, scroll
+with whole steps instead.
+When Efficient: Only use smooth
+scrolling on pages where it can be achieved with moderate usage of system
+resources.
+
+
+
+
+
+
+Fonts
+Under this tab, you can select various options related to the use
+of fonts. Although the shapes and sizes of fonts are often part of the
+design of a web page, you can select some default settings for
+&konqueror; to use.
+
+The first thing you can set here is the font size. There are two
+settings which work together to allow you a comfortable browsing
+experience.
+
+Firstly, you can set a Minimum font size.
+This means, even if the font size is set specifically in the page you
+are viewing, &konqueror; will ignore that instruction and never show
+smaller fonts than you set here.
+
+Next you can set a Medium font size. This is
+not only the default size of text, used when the page does not specify
+sizes, but it is also used as the base size that relative font sizes are
+calculated against. That is, the &HTML; instruction
+smaller, it means smaller than the size you set for this
+option.
+
+For either option, you can select the exact font size in points by
+using the up/down spin control (or just typing) next to the option
+label.
+
+These options are independent of each other. Pages that do not
+set a font size, or ask for the default, will display with the size
+you set from Medium font size, while any pages
+that ask for a size smaller than your Minimum font
+size setting will instead show that size. The one does not
+affect the other.
+
+The remaining options are for the fonts to be associated with
+different types of markup used in &HTML; pages. Note
+that many web pages may override these settings. For any type of font
+(Standard, Fixed, Serif, &etc;) you can select a different font if you like.
+
+Below this, you can set a Font size adjustment for this
+encoding. Sometimes the fonts you want to use for a
+particular encoding or language are much larger or smaller than average,
+so you can use this setting to bring them into line.
+
+You can set a default encoding that &konqueror; should assume
+pages are when rendering them. The default setting is Use
+Language Encoding, but you can change it to any encoding
+available in the list.
+
+
+
+
+
+Stylesheets
+
+
+Introduction
+
+CSS style sheets affect the way web pages
+appear. CSS stands for
+Cascading Style
+Sheets.
+
+&kde; can use its own stylesheet, based on simple defaults and
+the color scheme you are using for your desktop. &kde; can also use a
+stylesheet that you have written yourself. Finally, you can specify a
+stylesheet in this module. The options presented in this module are
+tuned for accessibility purposes, especially for people with reduced
+vision.
+
+Your choices here affect every &kde; application that renders HTML
+with &kde;'s own renderer, which is called khtml. These include
+&kmail;, &khelpcenter; and of course &konqueror;. Choices here do not
+affect other browsers such as &Netscape;.
+
+
+
+
+Stylesheets
+
+This section contains the following options:
+
+
+
+Use default stylesheet
+
+&kde; will use the default stylesheet. Some of the colors will
+default to those defined in your chosen color scheme. Most settings are
+easily overridden by the page you are viewing.
+
+
+
+
+Use user-defined stylesheet
+
+&kde; will use a stylesheet that you have written yourself. You
+can use the browse button to locate the stylesheet on your system.
+CSS files traditionally have a .css extension, but this is not
+required.
+
+
+
+
+Use accessibility stylesheet
+
+Use the settings defined in the Customize
+dialog. Enabling this option will enable the Customize
+button lo launch a dialog to define stylesheet settings.
+
+
+
+
+
+
+
+Customize
+
+In this dialog you can set up a user stylesheet. The options available are
+only a subset of the instructions you can add in a stylesheet, and they
+are geared towards people with reduced vision, to allow users to create
+a stylesheet that makes web pages and the &kde; help files more
+readable.
+
+The options in this dialog are disabled unless you chose
+Use accessibility stylesheet.
+
+
+Font Family
+
+
+
+Base family
+
+Choose a font family to use for body text.
+
+
+
+
+Use same family for all text
+
+If you enable this, then the same font family will be used for all
+text, regardless of the settings on the page you are viewing. This is
+useful for pages which have used a decorative or hard to read font for
+headlines.
+
+
+
+
+
+
+Font Size
+
+
+
+Base font size
+
+This is the default size for text on the page. Many web sites set
+their font sizes relative to this default, using larger
+or +1 to make the text bigger, and smaller
+or -1 to make the text smaller.
+Many people design their web pages on platforms where the ordinary
+default text size is too large for the average user to read, so it is
+very common to come across web pages that have forced the font smaller
+in this way.
+This setting will allow you to set the default font to a
+comfortable size, so that the relative sizes are also enlarged enough to
+be comfortable.
+Do not forget you can also have &konqueror; enforce a minimum size,
+so that text is never too small to read.
+
+
+
+
+
+
+Use same size for all elements
+
+If you enable this option, then all text will be rendered at your
+specified font size, regardless of the instructions the page contains.
+Relative font sizes as discussed earlier, and even specific instructions
+that text should be rendered at a certain size will be overridden
+here.
+
+
+
+
+
+
+Images
+
+
+
+Suppress images
+
+If you do not want to view images, you can turn this off
+here.
+
+
+
+Suppress background images
+
+One major problem for reduced vision users is that background
+images do not give sufficient contrast to allow them to read the text.
+You can disable background images here, independently of your choice
+above to view all images.
+
+
+
+
+
+
+Colors
+
+
+
+Black on white
+
+Many people with reduced vision find black text on a white screen
+gives the most contrast, and is easiest to read. If this applies to
+you, you can set this here.
+
+
+
+
+White on black
+
+Many other people with reduced vision find the opposite to be
+true, that white text on a black screen is easier to read.
+
+
+
+
+Custom
+
+Still other people find that pure black and white, in either
+order, is difficult to read. You can set custom colors here for both
+the Background and the
+Foreground.
+
+
+
+
+Use same color for all text
+
+Many web sites use a different, often contrasting color for
+headings or other flourishes. If this interferes with your ability to
+read the content, you can enable this check box to have &kde; use the
+colors you have set above for all text.
+
+
+
+
+
+
+
+Preview
+
+The Preview section allows you to see the effect of
+your changes. Several types of headings are displayed with your stylesheet,
+and a sentence in the default body text.
+
+This should allow you to fine-tune your stylesheet until you have
+something that you can comfortably read.
+
+Happy surfing!
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/kcmlaunch/CMakeLists.txt b/doc/kcontrol/kcmlaunch/CMakeLists.txt
new file mode 100644
index 00000000..12f7ee5f
--- /dev/null
+++ b/doc/kcontrol/kcmlaunch/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/kcmlaunch)
diff --git a/doc/kcontrol/kcmlaunch/index.docbook b/doc/kcontrol/kcmlaunch/index.docbook
new file mode 100644
index 00000000..68d3e352
--- /dev/null
+++ b/doc/kcontrol/kcmlaunch/index.docbook
@@ -0,0 +1,59 @@
+
+
+
+]>
+
+
+
+Launch Feedback
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+
+Sometimes it is reassuring to know that your computer didn't just
+ignore your command, and something is happening behind the scenes. In
+this module you can configure visible feedback to help you know if you
+really hit that icon or not.
+
+The traditional way to indicate that your computer is busy is to
+modify the cursor, and you can turn this on by choosing a
+Busy Cursor.
+
+With this option enabled, your cursor will have an icon attached
+to it for a short time, when a new application is being launched. You
+can configure how long this icon is displayed beside your cursor with the
+Startup indication timeout: spinbox. The
+default is 10 seconds.
+
+There are several variations of busy cursor available, including
+a Blinking Cursor, a Bouncing Cursor
+or a Passive Busy Cursor icon with no animation.
+
+Traditional &kde; launch notification has taken another form,
+which you can also enable and disable here. Normally when you start an
+application, it gets an immediate entry in the taskbar, with the icon
+replaced by a spinning hourglass to let you know something is
+happening. You can toggle this behavior on and off with the
+Enable taskbar notification checkbox, and when it's
+enabled, you can set a time in the
+Startup indication timeout spinbox.
+
+Not all applications that you start will eventually show a
+window, or an entry in the taskbar. Some of them, for example, are
+docked into the &kde; system tray. Alternatively, it might be that you
+sent it off to a different virtual desktop, and in the Filters
+section of the
+Task Manager Settings the option Only show
+tasks from the current desktop is checked. Setting a timeout ensures that,
+even in these cases, you can still get launch feedback, but also that
+it will go away when the job is done.
+
+
diff --git a/doc/kcontrol/kcmnotify/CMakeLists.txt b/doc/kcontrol/kcmnotify/CMakeLists.txt
new file mode 100644
index 00000000..446889dc
--- /dev/null
+++ b/doc/kcontrol/kcmnotify/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/kcmnotify)
diff --git a/doc/kcontrol/kcmnotify/index.docbook b/doc/kcontrol/kcmnotify/index.docbook
new file mode 100644
index 00000000..a1726040
--- /dev/null
+++ b/doc/kcontrol/kcmnotify/index.docbook
@@ -0,0 +1,159 @@
+
+
+
+]>
+
+
+System Notification Settings
+
+
+
+&Mike.McBride; &Mike.McBride.mail;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+system notification
+notification
+
+
+
+
+System Notification Settings
+
+&kde;, like all applications, needs to inform the user when a
+problem occurs, a task is completed, or something has happened. &kde;
+uses a set of System Notifications to keep the user
+informed on what is happening.
+
+Using this module, you can determine what &kde; does to communicate
+each event.
+
+This settings module consists of the two tabs Applications
+and Player Settings.
+
+
+Applications
+To configure a notification, simply select the application from the drop down box at the top
+of the dialog labeled Event source:. This will lead to a list of
+all configurable notifications for the application. The list of notifications includes 6 columns to
+the left of the notification name. These columns (from left to right) are:
+
+
+
+Play a sound
+This does exactly what you think it does. If an icon is present in this column, &kde; will play a specific sound over the speakers. This is commonly used by games in &kde; for starting a new game, or other action within the game.
+
+
+
+Show a message in a pop up
+If an icon is present in this column, &kde; will open a message box and inform the user of the notification. This is probably the most commonly selected option for alerting users to an error.
+
+
+
+Log to a file
+If an icon is present in this column, &kde; will write certain information to a file on disk for later retrieval. This is useful for tracking problems or important system changes.
+
+
+
+Mark taskbar entry
+If an icon is present in this column, &kde; will cause the taskbar to flash until the user has clicked the taskbar entry. This is most useful when you want the user to look at the program (such as a new email message was received, or the users name was said on an IRC channel).
+
+
+
+Speech
+If a mark is in this checkbox, &kde; will cause the taskbar of the program sending the notification to flash until the user has clicked the taskbar entry.
+
+
+
+
+Run command
+If an icon is present in this column, a separate program will be executed when this notification is performed. This can be used to execute a program to help restore data, shutdown a potentially compromised system or email another user to alert them to a problem.
+
+
+
+
+Change a notification
+To make a change to a notification, click on the name of the notification once with the &LMB;. The notification will be highlighted
+and the checkboxes for all notification types are enabled.
+
+You can have more than one event triggered by a single notification. As an example, it is easy to have a sound played and
+a message box appear in response to a system notification. One notification does not prevent other notifications from operating.
+
+The following list details each of the notification types and how to use them.
+
+
+
+Play a sound
+If a mark is in this checkbox, &kde; will play a sound everytime this notification is initiated. To specify the sound, use the text box to the right of the checkbox to enter the folder location of the sound file you want &kde; to play. You can use the folder button (located to the far right of the dialog box) to browse your directory tree. To hear a test of your sound, simply click on the play button (small button directly to the right of Play a sound.)
+
+
+
+Show a message in a pop up
+If a mark is in this checkbox, &kde; will open a message box and inform the user of the notification. The text of the box can not be changed from this dialog.
+
+
+
+Log to a file
+If a mark is in this checkbox, &kde; will write certain information to a file on disk for later retrieval. To specify the log file to use, enter the pathname in the text box to the right of the checkbox. You can use the folder button (located to the far right of the dialog box) to browse your directory tree.
+
+
+
+Mark taskbar entry
+If a mark is in this checkbox, &kde; will cause the taskbar of the program sending the notification to flash until the user has clicked the taskbar entry.
+
+
+
+Run command
+If a mark is in this checkbox, a separate program will be executed when this notification is performed. To specify the program to execute, enter the pathname in the text box to the right of the checkbox. You can use the folder button (located to the far right of the dialog box) to browse your directory tree.
+
+
+
+Speech
+If a mark is in this checkbox, &kde; will use Jovie to speak the event
+message, event name or custom text.
+If you select Speak Custom Text, enter the text in the box.
+You may use the following
+substitution strings in the text:
+
+%e Name of the event
+%a Application that sent the event
+%m Message sent by the application
+
+
+
+
+
+You can use the icon columns (located to the left of the notifications) to quickly select or deselect the options. Clicking in the column with the &LMB; will toggle the notification on and off.
+
+
+
+
+Player Settings
+
+
+
+Use the &kde; sound system
+If a mark is in this radio button, &kde; will play all sound notifications through the &kde; sound system. You can adjust the volume of system notifications using the slider.
+The slider only affects &kde; system notifications. Changes to this slider will not affect other sounds on your computer.
+
+
+Use an external player
+If a mark is in this radio button, &kde; will not use the &kde; sound system to play the sound. This is a good choice if the sound format you want to use is not supported by the &kde; notification system. After checking the radio box, enter the full path and name of the program you want to use into the text field. You can use the folder button (located along the right side) to browse the directory tree.
+
+
+No audio output
+Disables all sound notifications.
+
+
+
+
+
+
diff --git a/doc/kcontrol/kded/CMakeLists.txt b/doc/kcontrol/kded/CMakeLists.txt
new file mode 100644
index 00000000..101c29b8
--- /dev/null
+++ b/doc/kcontrol/kded/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/kded)
diff --git a/doc/kcontrol/kded/index.docbook b/doc/kcontrol/kded/index.docbook
new file mode 100644
index 00000000..b63668ac
--- /dev/null
+++ b/doc/kcontrol/kded/index.docbook
@@ -0,0 +1,64 @@
+
+
+
+]>
+
+
+
+
+Service Manager
+
+BurkhardLück
+lueck@hube-lueck.de
+
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+Service
+
+
+
+
+The Service Manager module allows you to have an overview of all
+plugins of the &kde; Daemon, also referred to as &kde; Services. Generally,
+there are two types of service:
+
+
+
+
+Load-on-Demand Services
+
+This is a list of available &kde; services which will be started on demand.
+They are only listed for convenience, as you cannot manipulate these
+services.
+
+
+
+
+Startup Services
+
+This shows all &kde; services that can be loaded on &kde; startup.
+Services checked in the Use column will be invoked on next startup.
+Be careful with deactivation of
+unknown services: some services are vital for &kde;; do
+not deactivate services if you do not know what you are doing.
+
+To change the Status of a service, select it in the list.
+Then you can use the Start and Stop
+to change the status of a service from Not running to Running
+and vice versa.
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/khtml-adblock/CMakeLists.txt b/doc/kcontrol/khtml-adblock/CMakeLists.txt
new file mode 100644
index 00000000..c50b0f11
--- /dev/null
+++ b/doc/kcontrol/khtml-adblock/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/khtml-adblock)
diff --git a/doc/kcontrol/khtml-adblock/index.docbook b/doc/kcontrol/khtml-adblock/index.docbook
new file mode 100644
index 00000000..e153d5f4
--- /dev/null
+++ b/doc/kcontrol/khtml-adblock/index.docbook
@@ -0,0 +1,90 @@
+
+
+
+
+]>
+
+
+
+AdBlocK Filters
+
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+
+
+
+2011-11-22
+&kde; 4.8
+
+
+&konqueror; AdBlocK can be configured to replace or remove
+images or frames from web pages that match a series of filters.
+
+The setting Enable filters enables or
+disables the use of list of URL filters.
+If Hide filtered images is enabled then
+blocked images are completely removed from the page and the space they
+occupied is reclaimed. If the option is disabled then a placeholder
+image is used in place of filtered images.
+
+
+
+Manual Filter
+
+The main part of this tab is a list of
+URLs that will be compared against image and frame names to decide
+on fitlering actions. The wildcards can be given as filename style
+regular expressions.
+
+Use the Search edit box above the list box
+to filter matching entries an the fly.
+
+Each filter can either be expressed as a file style wildcard
+string (e.g. http://www.site.com/ads/*) or as a full regular expression
+by enclosing the filter with forward slashes (e.g. //(ads|dclk)\./).
+
+Any filter string can be preceded by @@ to whitelist
+(allow) any matching &URL;, which takes priority over any blacklist (blocking)
+filter.
+
+Import and Export will
+save or read the current filter list to a plain text file. The file begins with a
+header line [AdBlock], then all of the filters follow each
+on a separate line. Lines prefixed with an exclamation mark (!)
+and the header line are treated as comments and can be used
+to clarify or label a set of filters.
+
+Highlight an entry from the list to change it in the edit box or remove this item.
+Enter a new filter string here and add it to the list using the
+Insert button.
+
+
+
+
+Automatic Filter
+
+
+This tab shows a list of names and &URL;'s with predefined AdBlock filter entries.
+To enable an entry tick the checkbox beside the filter name and adjust the
+Automatic update interval (default 7 days).
+
+
+
+
+
+
+
+If AdBlock filters are enabled, an icon at the right side of status bar is shown.
+Use a &RMB; click on this icon to open the context menu with actions to show all blockable
+elements on a web page, open this &systemsettings; module and disable blocking for a site
+or page temporarily.
+
+A click with the &LMB; shows the dialog with all blockable elements on the opened web page
+as well. From this dialog you can add new filters directly without opening this &systemsettings;
+module.
+
+
diff --git a/doc/kcontrol/khtml-behavior/CMakeLists.txt b/doc/kcontrol/khtml-behavior/CMakeLists.txt
new file mode 100644
index 00000000..71ad7fbb
--- /dev/null
+++ b/doc/kcontrol/khtml-behavior/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/khtml-behavior)
diff --git a/doc/kcontrol/khtml-behavior/index.docbook b/doc/kcontrol/khtml-behavior/index.docbook
new file mode 100644
index 00000000..f101feac
--- /dev/null
+++ b/doc/kcontrol/khtml-behavior/index.docbook
@@ -0,0 +1,96 @@
+
+
+
+
+]>
+
+
+
+Web Browsing
+
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+
+
+
+2011-11-11
+&kde; 4.10
+
+
+KDE
+Systemsettings
+konqueror
+browsing
+
+
+
+
+Web Browsing
+
+The &konqueror; Browser module of &systemsettings; allows you to select
+various options for the behavior of &konqueror;, the
+integrated web browser of &kde;.
+
+If Ask for name and folder when adding bookmarks
+is checked, &konqueror; will allow you to change the title of the
+bookmark and choose a folder in which to store it when you add a new
+bookmark.
+
+Enable Show only marked bookmarks in bookmark toolbar
+and &konqueror; will show only those bookmarks in the
+bookmark toolbar which you have marked to do so in the bookmark editor.
+
+The next option you can enable on this page is Form
+Completion. If you check this box, &konqueror; will
+try to remember what you answer to form questions, and will try to fill
+in forms for you with the answers you previously used.
+
+You can configure the number of form items &konqueror; remembers
+with the spin box labelled Maximum
+completions
+
+Of course, anything &konqueror; fills in a form with, you
+can still edit before submitting the form!
+
+The next option is Change cursor over
+links. If this option is selected, the shape of the cursor
+will change (usually to a hand) whenever it moves over a
+hyperlink. This makes it easy to identify links, especially when they
+are in the form of images.
+
+If Middle click opens URL in selection
+is checked, you can open the &URL; in the selection by middle
+clicking on a &konqueror; view.
+
+As a convenience feature, if you enable Right click
+goes back in history, then clicking an empty area (&ie; not
+a link) in the &konqueror; window will act as if you pressed the
+Back button on the toolbar.
+
+Enabling Allow automatic delayed
+reloading/redirecting allows websites to send you to
+another page without your interaction. In many cases, this is a
+convenience. For example, the website has moved to a new
+&URL;. Many webmasters in this situation will put up
+a page on the old site, telling you that it has moved and you may like
+to change your bookmark, and then automatically move you along to the
+new website. However, such features can be confusing, or annoying,
+when misused, and so you may wish to disable it.
+
+Enable Access Key activation with &Ctrl; key:
+Pressing the &Ctrl; key when viewing web pages activates Access Keys.
+Unchecking this box will disable this accessibility feature. &konqueror;
+needs to be restarted for this change to take effect.
+
+Send the DNT header to tell web sites you do not want
+to be tracked. Check this box if you want to inform a web site
+that you do not want to your web browsing habits tracked.
+
+
+Offer to save website passwords.
+Uncheck this box from being prompted to save website passwords
+
+
+
+
diff --git a/doc/kcontrol/khtml-general/CMakeLists.txt b/doc/kcontrol/khtml-general/CMakeLists.txt
new file mode 100644
index 00000000..23cdaef4
--- /dev/null
+++ b/doc/kcontrol/khtml-general/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/khtml-general)
diff --git a/doc/kcontrol/khtml-general/index.docbook b/doc/kcontrol/khtml-general/index.docbook
new file mode 100644
index 00000000..70c14f08
--- /dev/null
+++ b/doc/kcontrol/khtml-general/index.docbook
@@ -0,0 +1,135 @@
+
+
+
+]>
+
+
+General &konqueror; Behavior
+
+
+
+&Burkhard.Lueck;
+
+
+
+2011-11-22
+&kde; 4.8
+
+
+On this page you find settings for home and start page and the behavior
+of tabbed browsing both for &konqueror;'s file manager and browser mode.
+
+
+
+When Konqueror starts
+
+This option determines which page is displayed when &konqueror; starts,
+the introduction page, your home page, a blank page or your bookmarks page.
+
+
+
+
+Home page
+This is the &URL; (⪚ a
+folder or a web page) where &konqueror; in browser mode will jump to
+when the Home Page button in the toolbar is pressed.
+You can set a path that is your Home page by
+typing into the text field, or using the browse
+icon to select a local folder. &konqueror; needs to be restarted for
+changes to take effect.
+When &konqueror; is used in file manager mode, the Home Page
+button in the toolbar is replaced by a Home Folder button
+which makes it jump to your local home folder instead.
+
+
+
+Default web browser engine
+
+This option provides an easy way to select the preferred web engine in &konqueror;, either
+KHTML or Webkit, if installed.
+Using the ViewView Mode
+menu allows you to change the web engine temporarily on the fly.
+
+
+
+
+
+Open links in
+new tab instead of in new window
+&konqueror; defaults to a single window per page, but has the
+capability to open multiple tabs inside a
+single window. &konqueror; also, by default, has a &MMB; shortcut to
+open any link in a new window. If you enable Open links in
+new tab instead of in new window you can &MMB; click on a
+link to have it open in a new tab.
+
+
+
+Open popups in new tab instead of in new window
+Whether or not JavaScript popups if allowed shall open in a new tab or in a
+new window.
+
+
+
+Open as tab in existing Konqueror when URL is called externally
+When you click a &URL; in another &kde; program or call kfmclient to open a &URL;,
+the current desktop will be searched for a non-minimized &konqueror; and, if
+found, the &URL; opened as a new tab within it. Otherwise a new &konqueror;
+window will be opened with the required &URL;.
+
+
+
+Open new tabs in the background
+If you are using tabbed browsing, you can choose if a newly
+opened tab becomes the active (front) tab, or goes to
+the back. On a slow Internet connection, or while browsing a page
+that has a list of headlines or other links in a list, you may like to
+have the new tabs load in the background while you continue reading.
+In this case, enable this setting. If you prefer to go
+straight to the new page, leaving the old one in the background to
+return to later, disable it.
+
+
+
+Open new tab after current tab
+This will open a new tab opened from a page after the current tab, instead
+of after the last tab.
+
+
+
+Hide the tab bar when only one tab is open
+This will display the tab bar only if there are two or more tabs. Otherwise
+it will always be displayed.
+
+
+
+Show close button on tabs
+This will display close buttons inside each tab instead of websites' icons.
+
+
+
+Middle-click on a tab to close it
+When you click on a tab using the middle mouse button or mouse wheel, it
+will close that tab. &konqueror; needs to be restarted for changes to take
+effect.
+
+
+
+Confirm when closing windows with multiple tabs
+If you close a window in &konqueror; that has multiple tabs
+open, &konqueror; will ask you if you're sure that you meant to close
+it. You can toggle on and off this behavior with this
+check box.
+
+
+
+Activate previously used tab when closing the current tab
+When checking this the previous used or opened tab will be activated when
+you close the current active tab instead of the one right to the current tab.
+
+
+
+
+
diff --git a/doc/kcontrol/khtml-java-js/CMakeLists.txt b/doc/kcontrol/khtml-java-js/CMakeLists.txt
new file mode 100644
index 00000000..c91facf6
--- /dev/null
+++ b/doc/kcontrol/khtml-java-js/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/khtml-java-js)
diff --git a/doc/kcontrol/khtml-java-js/index.docbook b/doc/kcontrol/khtml-java-js/index.docbook
new file mode 100644
index 00000000..0b0e5dad
--- /dev/null
+++ b/doc/kcontrol/khtml-java-js/index.docbook
@@ -0,0 +1,145 @@
+
+
+
+
+]>
+
+
+
+Java and JavaScript
+
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+
+
+
+2009-11-24
+&kde; 4.4
+
+
+KDE
+Systemsettings
+konqueror
+browsing
+Java
+JavaScript
+
+
+
+
+&Java; and JavaScript
+
+
+&Java;
+
+&Java; allows applications to be downloaded and run by a web
+browser, provided you have the necessary software installed on your
+machine. Many web sites make use of &Java; (for example, online
+banking services or interactive gaming sites). You should be aware
+that running programs from unknown sources could pose a threat to the
+security of your computer, even if the potential extent of the damage
+is not great.
+
+The check box Enable Java globally allows
+you to turn &Java; support on for all web sites by default. You can
+also select to turn &Java; on or off for specific hosts. To add a
+policy for a specific host, click the New...
+button to bring up a dialog in which you can type the host name and
+then choose to accept or reject &Java; code from that particular host,
+which will add the domain to the list on the left of the page.
+
+You can select a host in the list, and click the
+Change... button to choose a different policy for
+that host. Clicking the Delete button removes the
+policy for the selected host; after deletion, the global settings will
+then apply to that host.
+
+Finally, the group of controls labeled Java Runtime
+Settings allows you to set some options for the way in
+which &Java; should run.
+
+Use security
+manager is normally enabled by default. This setting will
+cause the JVM to run with a Security Manager in place. This will keep
+applets from being able to read and write to your file system, creating
+arbitrary sockets, and other actions which could be used to compromise
+your system. Disable this option at your own risk. You can modify your
+$HOME/.java.policy file with the
+&Java; policytool utility to give code downloaded from certain sites
+more permissions.
+
+Use KIO will cause the
+JVMto use &kde;'s own KIO
+transports for network connections.
+
+The Shutdown applet server when inactive for more than
+check box allows you to save resources by closing the &Java; Applet
+Server when it is not in use, rather than leaving it running in the
+background. Leaving this disabled may make &Java; applets start up
+faster, but it will use system resources when you are not using a
+&Java; applet. If you enable this, you can set a timeout.
+
+You can either opt to have &konqueror; automatically detect the
+&Java; installation on your system, or specify the path to the
+installation yourself by selecting Path to Java
+executable or 'java'. You may want to choose the latter method, for
+instance, if you have multiple &Java; installations on your system,
+and want to specify which one to use. If the &Java; Virtual Machine
+you are using requires any special startup options, you can type them
+in the text box labeled Additional Java
+arguments.
+
+
+
+
+JavaScript
+
+Despite the name, JavaScript is not related at all to
+&Java;.
+
+The first part of this tab works the same as the &Java; settings.
+
+The checkbox Enable JavaScript globally allows
+you to turn JavaScript support on for all web sites by default. You
+can also select to turn JavaScript on or off for specific hosts. To
+add a policy for a specific host, click the
+New... button to bring up a dialog in which you
+can type the host name and then choose to accept or reject JavaScript
+code from that particular host, which will add the domain to the list
+on the left of the page.
+
+You can select a host in the list, and click the
+Change... button to choose a different policy for
+that host. Clicking the Delete button removes the
+policy for the selected host; after deletion, the global settings will
+then apply to that host.
+
+The final set of options in the section Global JavaScript
+Policies determine what happens
+when a page uses JavaScript for specific actions.
+
+You can individually enable or disable the ability of JavaScript
+to manipulate your windows by moving, resizing or changing focus. You
+can also disable JavaScript from changing the status bar text, so that
+for instance, you can always see where links will take you when
+clicked. The choices for these options are Allow and
+Ignore.
+
+For opening a new window, there is even more control. You can
+set &konqueror; to Allow all such requests,
+Ask each time a request is made, or
+Deny all popup requests.
+
+The Smart setting will only allow
+JavaScript popup windows when you have explicitly chosen a link that
+creates one.
+
+
+
+
+
diff --git a/doc/kcontrol/khtml-plugins/CMakeLists.txt b/doc/kcontrol/khtml-plugins/CMakeLists.txt
new file mode 100644
index 00000000..f65154b2
--- /dev/null
+++ b/doc/kcontrol/khtml-plugins/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/khtml-plugins)
diff --git a/doc/kcontrol/khtml-plugins/index.docbook b/doc/kcontrol/khtml-plugins/index.docbook
new file mode 100644
index 00000000..410162be
--- /dev/null
+++ b/doc/kcontrol/khtml-plugins/index.docbook
@@ -0,0 +1,149 @@
+
+
+
+
+]>
+
+
+
+Browser Plugins
+
+&Krishna.Tateneni;&Jost.Schenck;
+
+
+
+
+2009-11-24
+&kde; 4.4
+
+
+KDE
+Systemsettings
+Konqueror
+Browsing
+Plugins
+
+
+
+
+
+Browser Plugins
+
+
+Global Settings
+
+The first setting here is Enable Plugins
+globally. If you disable this check box, then &konqueror;
+will not use any plugins. If you enable it, then any installed and
+configured plugins that it can find will be used by &konqueror;
+
+You can also restrict &konqueror; to Only allow HTTP
+and HTTPS URLs for plugins by checking the box.
+
+The next option determines, if plugins are loaded on demand only.
+Use the slider labeled CPU priority for plugins
+to adjust this setting.
+
+
+Click the Domain-Specific Settings button to open
+a dialog where you can set specific plugin policies for any particular
+host or domain. These policies will be used instead of the default policy for
+enabling or disabling plugins on pages sent by these domains or hosts.
+
+Add a new policy here or select a policy and use the controls on the right to modify it.
+
+
+
+
+Plugins
+
+
+Introduction
+
+As &Netscape;'s Navigator has been a
+web browsing standard for many years, so-called &Netscape; plugins have
+appeared that allow rich web content. Using those plugins, web sites
+can contain PDF files, flash animations, video, &etc;
+With &konqueror;, you can still use these plugins to take advantage of
+rich web content.
+
+&Netscape; plugins should not be confused with &konqueror;
+plugins. The latter ones specifically extend &konqueror;'s
+functionality; they are normally not used to display rich web
+content.
+
+
+
+
+Scan for Plugins
+
+&konqueror; has to know where your &Netscape; plugins are
+installed. This can be in several places, &ie; you might have
+system-wide plugins in /opt/netscape/plugins and your personal
+plugins in $HOME/.netscape/plugins.
+However, &konqueror; will not automatically use the installed plugins:
+it first has to scan a list of folders. You can initiate the scan
+by clicking Scan for Plugins.
+
+To find plugins, &konqueror; will look in the folders
+specified in the Folders frame. When you
+use this control module for the first time, this list will already be
+filled with reasonable paths that should work on most operating systems.
+If you need to provide a new path, click the New
+button; then you can either enter the new path in the text edit box to
+the left, or choose a folder using the file dialog by clicking the
+Open file icon. As scanning the folders can take
+a little time, you might want to remove folders from the list where
+you know that no plugins are installed: do this by selecting a folder
+and clicking Remove. Using the
+Up and Down buttons you
+can change the order in which folders will be scanned by moving the
+selected folder up or down.
+
+As usual, click Apply to save your changes
+permanently.
+
+
+
+
+Plugins
+
+In this section, you can see a list of the &Netscape; plugins found by
+&konqueror;, displayed as a tree. Double click on a plugin to fold it
+out and you will see that the different mime types this plugin can handle
+will be displayed as branches. Fold out a mime type to see its
+info.
+
+This list is only for informational purposes.
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/language/CMakeLists.txt b/doc/kcontrol/language/CMakeLists.txt
new file mode 100644
index 00000000..b4f20027
--- /dev/null
+++ b/doc/kcontrol/language/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/language)
diff --git a/doc/kcontrol/language/index.docbook b/doc/kcontrol/language/index.docbook
new file mode 100644
index 00000000..cf15342e
--- /dev/null
+++ b/doc/kcontrol/language/index.docbook
@@ -0,0 +1,633 @@
+
+
+
+]>
+
+
+
+Country/Region & Language
+
+&Mike.McBride; &Mike.McBride.mail;
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+
+
+
+ 2013-12-05
+ 4.12
+
+
+ KDE
+ Systemsettings
+ locale
+ country
+ language
+
+
+
+
+
+
+Country/Region & Language
+
+
+This module of the &kde; &systemsettings; allows you to select customization
+options that depend on the region of the world that you happen to live in.
+There are seven different tabs in this module, each of which is described in
+detail in the following sections.
+
+
+
+In most cases, you can simply select the country and the language, and the
+other options will be set in an appropriate manner.
+
+
+
+Below the tabs of this module you can see a preview of what the settings look
+like. In addition to positive and negative numbers, you can see how positive
+and negative currency values, long and short dates, and times are displayed.
+When you change any of the settings, the preview shows the effects of the
+changes before you apply them.
+
+
+
+Each setting option in the various tabs has an individual
+
+ default button which
+is activated whenever that setting is different to your country default value.
+Clicking on the button will restore only that setting to your Country default.
+
+
+
+
+
+Country
+
+
+In this tab you can select the country or region that you want to use.
+
+
+
+The Country drop down box contains the list of available
+countries and will initially show your currently selected country. If the
+selection shows System Country then you have not set a country
+and are defaulting to the Country set by the system, which will also be shown.
+Changing the country will automatically change the settings to the defaults for
+that country, except were you have set your own settings which will be left
+unchanged. You can easily see where your personal settings differ from the
+country settings by looking at the Default button next to the individual
+setting. If the button is enabled then your personal setting is different and
+you can click on the button to restore the country setting for that option
+only.
+
+
+
+
+
+
+
+Languages
+
+
+In this tab you can set your preferred languages for the &kde; Workspace and
+Applications to be displayed in.
+
+
+
+The &kde; Workspace and Applications are written in American English and are
+translated into many different languages by teams of volunteers. These
+translations need to be installed first before you can choose to use them. The
+list of Available Languages shows what KDE translations
+are installed and available on your system. If the language you want to use is
+not shown in this list then you will need to install it using the usual method
+for your system. Your system may have enabled the
+Install more languages button to make this easy for you.
+
+
+
+The Preferred Languages list shows the languages that will
+be used when displaying the &kde; Workspace and Applications. Because not all
+of the KDE Workspace and Applications may be translated into every language
+&kde; will try to find suitable translations for you by working down the
+Preferred Languages list until it finds a translation. If
+none of your preferred languages have a required translation then the original
+American English will be used.
+
+
+
+You can add a language to the Preferred Languages list by
+selecting it in the Available Languages and then clicking
+on the Add arrow button. You can remove a language from the
+Preferred Languages list by selecting it and then clicking
+on the Remove arrow button. You can change the order of preference in the
+Preferred Languages list by selecting a language and
+clicking on the Up or Down arrow button.
+
+
+Only languages listed in Preferred Languages and
+Available Languages will be offered as options
+for Primary language and Fallback language
+in the Switch Application Language dialog of the
+Help menu.
+
+
+
+
+Language and Country/Region are independent settings. Changing a language does
+not automatically change the settings for numbers,
+currency &etc; to the corresponding country or region. It will only change the
+language used in displaying dates, such as month names.
+
+
+
+
+
+
+
+
+Numbers
+
+
+On this tab, you can select options for how numbers are displayed. The defaults
+are selected automatically based on the country which is currently selected.
+
+
+In the first drop down box you can define the Digit grouping
+used to display numbers.
+
+
+In the Group separator text box you can type the character
+that you want to use to separate groups of digits in numbers, usually a
+. or a ,. You should ensure that
+this value is different to the Decimal separator setting.
+The drop-down box provides a list of common values to choose from.
+
+
+
+In the Decimal separator text box you can type the
+character that you want to use to separate the decimal portion of numbers,
+usually a . or a ,. You should
+ensure that this value is different to the Group separator
+setting. The drop-down box provides a list of common values to choose from.
+
+
+
+In the Decimal places spin box you can set the number of
+decimal places displayed for numeric values, &ie; the number of digits
+after the decimal separator.
+
+
+
+In the Positive sign text box you can type the character
+that you want to use to indicate positive numbers. You should ensure that this
+value is different to the Negative sign setting. The
+drop-down box provides a list of common values to choose from. This value may
+also be used for monetary values depending on the
+Positive format selected in the Money
+tab.
+
+
+
+In the Negative sign text box you can type the character
+that you want to use to indicate negative numbers. You should ensure that this
+value is different to the Positive sign setting. The
+drop-down box provides a list of common values to choose from. This value may
+also be used for monetary values depending on the
+Negative format selected in the Money
+tab.
+
+
+
+The Digit set drop down box lists digit sets which may be
+used instead of Arabic digits when displaying numbers. If you select a digit
+set other than Arabic, it will be applied only to numbers which appear in a
+language context that uses that digit set while Arabic digits are still going
+to be used elsewhere, ⪚ Arabic-Indic digits will be applied to Arabic but
+not to American English.
+
+
+
+Note that digit grouping, group separator, decimal separator, decimal places, positive format,
+negative format and the digit set used to display monetary values has to be set
+separately on the Money tab.
+
+
+
+
+
+
+
+Money
+
+
+On this tab, you can select options for how monetary values are displayed. The
+defaults are selected automatically based on the country which is currently
+selected.
+
+
+
+In the Currency drop-down box you can choose the currency
+you want to use when displaying monetary values. This will default to the main
+currency in use in your selected country. You can choose a different currency
+from the drop-down box, which displays the names of all available currencies
+their ISO 4217 standard Currency Code. The currencies used in your selected
+country are listed at the top, followed by all the other currencies. Changing
+the currency will also update the Currency symbol to use
+the default symbol for that currency, but no other format settings will be
+changed.
+
+
+
+In the Currency symbol drop-down box you can choose the
+currency symbol you want to use when displaying monetary values. This will
+default to the usual symbol of the currency you have selected in the
+Currency drop-down box. This will only allow you to select
+a valid currency symbol for the currency code to prevent inconsistent choices,
+such as choosing US Dollars but showing the Pound Sterling symbol £ instead.
+This setting will automatically be changed when you change the
+Currency setting.
+
+
+In the next drop down box you can define the Digit grouping
+used to display monetary values.
+
+
+In the Group separator text box you can type the character
+that you want to use to separate groups of digits in monetary values, usually a
+. or a ,. You should ensure that
+this value is different to the Decimal separator setting.
+The drop-down box provides a list of common values to choose from.
+
+
+
+In the Decimal separator text box you can type the
+character that you want to use to separate the decimal portion of monetary
+values, usually a . or a ,. You
+should ensure that this value is different to the
+Group separator setting. The drop-down box provides a list
+of common values to choose from.
+
+
+
+In the Decimal places spin box you can set the number of
+decimal places displayed for monetary values, &ie; the number of digits
+after the decimal separator.
+
+
+
+In the Positive format drop-down box you can select how
+you want positive monetary values to be displayed. The drop-down box displays a
+list of four sample formats that you can choose from, combining the options for
+where the Currency symbol and the numeric value
+Positive sign are displayed. You can also choose to
+replace the numeric value Positive sign with brackets.
+
+
+
+In the Negative format drop-down box you can select how
+you want negative monetary values to be displayed. The drop-down box displays a
+list of ten sample formats that you can choose from, combining the options for
+where the Currency symbol and the numeric value
+Negative sign are displayed. You can also choose to
+replace the numeric value Negative sign with brackets.
+
+
+
+The Digit set drop down box lists digit sets which may be
+used instead of Arabic digits when displaying money. If you select a digit
+set other than Arabic, it will be applied only to numbers which appear in a
+language context that uses that digit set while Arabic digits are still going
+to be used elsewhere, ⪚ Arabic-Indic digits will be applied to Arabic but
+not to American English.
+
+
+
+Note that digit grouping, group separator, decimal separator, decimal places, positive sign,
+negative sign and the digit set used to display numeric values has to be set
+separately on the Numbers tab.
+
+
+
+
+
+
+
+Calendar
+
+
+On this tab, you can select options for how calendar information is displayed.
+The defaults are selected automatically based on the country which is currently
+selected.
+
+
+
+In the Calendar system drop-down box you can choose the
+calendar system to be used when displaying or inputting dates. This will
+default to the main calendar system in use in your selected country, usually
+the Gregorian calendar. Changing the calendar system will also update the
+various weekday name drop-down combos with the names of days of the week in the
+new calendar system, will enable or disable the Use Common Era
+tick box and may change the value of the Short year window
+setting.
+
+
+
+Note that the Gregorian calendar used is a hybrid of the Julian calendar up to
+Thursday 4 October 1582 and the Gregorian calendar from Friday 15 October 1582,
+leaving a gap of ten missing days. We are aware
+this conversion date is not factually correct for all countries, however this
+is how Qt have chosen to implement the Gregorian calendar and we wish to remain
+consistent with them.
+
+
+
+If you have selected the Gregorian calendar system then the Use
+Common Era tick box will be enabled. This allows you to choose to
+use the Common Era (CE/BCE) instead of the Christian Era (AD/BC) when
+displaying and inputting dates. See the Date & Time
+tab for how to set this up.
+
+
+
+The Short year window option is only used when you choose
+to use a short two digit year format (YY) in the Long date
+format or Short date format settings in the
+Date & Time tab. When inputting a short year value,
+⪚ 10, the system must guess what century that year falls in. By setting
+the Short year window you tell the system how you want the
+short year to be interpreted, ⪚ whether 50 is interpreted as 1950 or 2050.
+This window can be set differently for each calendar system as they all use
+different epochs (start dates). For example, the Hebrew calendar is into its
+58th century (2010 Gregorian is roughly 5771 Hebrew), so may use a window of
+5750 to 5850.
+
+
+The Week number system option determines how the
+week number will be calculated. There are four options available:
+
+
+ISO Week
+Use the ISO standard Week Number. This will always use Monday
+as the first day of the ISO week. This is the most commonly used system.
+
+
+
+Full First Week
+The first week of the year starts on the first occurrence
+of the First day of the week, and lasts for seven days.
+Any days before Week 1 are considered part of the last week of the previous year.
+This system is most commonly used in the USA.
+
+
+
+Partial First Week
+The first week
+starts on the first day of the year. The second week of the year starts on
+the first occurrence of the First day of the week, and
+lasts for seven days. The first week may not contain seven days.
+
+
+
+Simple Week
+The first week starts on the first day of the year and lasts
+seven days, with all new weeks starting on the same weekday as the first day
+of the year.
+
+
+
+
+In the First day of week drop-down box you can choose
+which weekday is considered the first day of the week. This value is often
+used when displaying calendar tables to determine which day is listed first.
+
+
+
+In the First working day of week drop-down box you can
+choose which weekday is considered the first working day of the week. This
+value is often used when displaying calendar tables to determine when the
+weekend is.
+
+
+
+In the Last working day of week drop-down box you can
+choose which weekday is considered the last working day of the week. This
+value is often used when displaying calendar tables to determine when the
+weekend is.
+
+
+
+In the Week day for special religious observance drop-down
+box you can choose which weekday is regularly used for special religious
+observances. This value is often used when displaying calendar tables to
+red letter a certain day. If you do not have any particular
+weekday for religious observance then you can choose the
+None / None in particular option.
+
+
+
+
+
+
+
+Date & Time
+
+
+On this tab, you can select options for how date and time values are input or
+displayed. The defaults are selected automatically based on the country which
+is currently selected.
+
+
+
+In the Time format text box you can enter the format that
+you want to use to input and display times. The format entered is a combination
+of special codes representing time components and literal text used to separate
+the time components. The special time component codes are listed below. You can
+set the format to any combination of time components you like, but you should
+always include at least an hour and minutes portion to allow you to input times
+that are not ambiguous. The drop-down box provides a list of common time
+formats in your currently selected language to choose from.
+
+
+
+
+HH - The hour as a decimal number using a 24-hour clock
+(00-23).
+
+
+hH - The hour as a decimal number using a 24-hour clock
+(0-23).
+
+
+PH - The hour as a decimal number using a 12-hour clock
+(01-12).
+
+
+pH - The hour as a decimal number using a 12-hour clock
+(1-12).
+
+
+MM - The minutes as a decimal number (00-59).
+
+
+SS - The seconds as a decimal number (00-59).
+
+
+AMPM - Either 'AM' or 'PM' according to the given time
+value. Noon is treated as 'PM' and midnight as 'AM'. You should always include
+this code if you are using the 12-hour clock codes PH or
+pH to prevent ambiguity when entering times.
+
+
+
+
+In the AM symbol text box you can enter the symbol that
+you want to use to input or display for AM when using a 12-hour clock. The
+drop-down box provides a list of common symbols for your currently selected
+language to choose from.
+
+
+
+In the PM symbol text box you can enter the symbol that
+you want to use to input or display for PM when using a 12-hour clock. The
+drop-down box provides a list of common symbols for your currently selected
+language to choose from.
+
+
+
+In the Long date format text box you can enter the format
+that you want to use to input and display long dates. The format entered is a
+combination of special codes representing date components and literal text used
+to separate the date components. The special date component codes are listed
+below. You can set the format to any combination of date components you like,
+but you should always include at least enough components to uniquely identify a
+day in the year, ⪚ a month and day, to allow you to input dates that are not
+ambiguous. If you don't include a year component then the current year will be
+used. The drop-down box provides a list of common date formats in your
+currently selected language to choose from.
+
+
+
+
+YYYY - The year with century as a decimal number
+(0000-9999).
+
+
+YY - The year without century as a decimal number
+(00-99).
+
+
+MM - The month as a decimal number (01-12).
+
+
+mM - The month as a decimal number (1-12).
+
+
+MONTH - The full month name.
+
+
+SHORTMONTH - The first three characters of the month
+name.
+
+
+DD - The day of month as a decimal number (01-31).
+
+
+dD - The day of month as a decimal number (1-31).
+
+
+WEEKDAY - The full weekday name.
+
+
+SHORTWEEKDAY - The first three characters of the weekday
+name.
+
+
+ERAYEAR - The Era Year in local format (⪚ 2000 AD).
+
+
+SHORTERANAME - The short Era Name (⪚ AD).
+
+
+YEARINERA - The Year in Era as a decimal number
+(⪚ 2000).
+
+
+DAYOFYEAR - The Day of Year as a decimal number.
+
+
+ISOWEEK - The ISO Week as a decimal number.
+
+
+DAYOFISOWEEK - The Day of the ISO Week as a decimal
+number.
+
+
+
+
+In the Short date format text box you can enter the format
+that you want to use to input and display short dates. This is in the same
+format as the Long date format, please read that section
+for more details. The drop-down box provides a list of common date formats in
+your currently selected language to choose from.
+
+
+
+The Digit set drop down box lists digit sets which may be
+used instead of Arabic digits when displaying dates and times. If you select a
+digit set other than Arabic, it will be applied only to numbers which appear in
+a language context that uses that digit set while Arabic digits are still going
+to be used elsewhere, ⪚ Arabic-Indic digits will be applied to Arabic but
+not to American English.
+
+
+
+
+
+
+
+Other
+
+
+On this tab, you can select how other options are displayed. The defaults are
+selected automatically based on the country which is currently selected.
+
+
+
+In the Page size drop-down box you can choose the page
+size to use as the default for new documents, ⪚ in KWord. Note that this
+setting does not affect your default paper size in the print dialog, to set
+that you need to use the Printers module of the &kde; &systemsettings;.
+
+
+
+In the Measurement system drop-down box you can choose the
+measurement system to use, either metric or imperial.
+
+
+
+In the Byte size units drop-down box you can choose the
+unit system to use when displaying numbers counted in bytes. Traditionally
+kilobytes meant units of 1024 instead of the metric 1000 for
+most but not all byte sizes. To reduce confusion you can choose which system
+you prefer. The available unit systems are listed below.
+
+
+
+
+The IEC Units standard is always in multiples of 1024.
+
+
+The Metric Units standard is always in multiples of 1000.
+
+
+The JEDEC Units standard uses the traditional units used
+in &kde; 3.5 and some other operating systems.
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/language/oxygen-22x22-document-revert.png b/doc/kcontrol/language/oxygen-22x22-document-revert.png
new file mode 100644
index 00000000..75ff210d
Binary files /dev/null and b/doc/kcontrol/language/oxygen-22x22-document-revert.png differ
diff --git a/doc/kcontrol/nepomuk/CMakeLists.txt b/doc/kcontrol/nepomuk/CMakeLists.txt
new file mode 100644
index 00000000..cf87e2d6
--- /dev/null
+++ b/doc/kcontrol/nepomuk/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/nepomuk)
diff --git a/doc/kcontrol/nepomuk/index.docbook b/doc/kcontrol/nepomuk/index.docbook
new file mode 100644
index 00000000..96ef4ab7
--- /dev/null
+++ b/doc/kcontrol/nepomuk/index.docbook
@@ -0,0 +1,152 @@
+
+
+
+]>
+
+
+
+Nepomuk Desktop Search Configuration
+
+
+SebastianTruegtrueg@kde.org
+&Anne-Marie.Mahfouf; &Anne-Marie.Mahfouf.mail;
+
+
+
+2013-11-01
+&kde; 4.12
+
+
+KDE
+KControl
+nepomuk
+desktop search
+
+
+
+
+Introduction
+
+This module allows to configure certain parts of the desktop search and the Nepomuk semantic desktop. More information
+about the Nepomuk semantic desktop can be found at the Nepomuk homepage.
+
+
+Basic Settings
+
+The basic settings tab allows to enable or disable the semantic desktop and desktop search systems.
+
+There are three checkboxes:
+
+Enable Nepomuk Semantic Desktop Enabling the Nepomuk semantic desktop means that
+the Nepomuk services are running. These services provide metadata/annotation storage (files can be tagged or rated in &dolphin;
+for example) but also desktop search which can be used through the &kde; runner or again &dolphin;.
+Enable Nepomuk File Indexer Enabling the nepomuk file indexer means that
+the file indexer service is started in addition to the standard services already running. The file indexer service will run through
+all files in the configured folders (see below) and extract metadata from them (such as title or artist on music files or even
+simple things like the creation date). This metadata is then exposed through the desktop search just like the manual annotations
+mentioned earlier.
+Enable PIM Data Indexer This option has to be checked to allow full text search in
+&kmail;.
+
+
+On the right of Enable Nepomuk Semantic Desktop you can click on Details... and
+a dialog will inform you on the status of the KDE metadata store: how many files are indexed and the size of the store.
+
+Under the Enable Nepomuk File Indexer checkbox the current status of the file indexing service is
+shown. The service has four normal operation states:
+
+File indexer is idle - The file indexer is currently not working and waiting for an event to
+trigger an update (an event can be a newly created file or a changed file or a timeout for the recurring full check)
+Indexing files in folder foobar - The file indexer is currently running though
+all files in folder foobar and analyzes new or changed files.
+Scanning for recent changes in files for desktop search - The file indexer is currently performing
+its recurring check for new files in all index folders. This check is intended to find files that were not caught through normal file
+system monitoring.
+File indexer is suspended - The file indexer has been suspended, &ie; it is in a paused state.
+This can either be triggered by the user or due to low disk space or a laptop being in a power-saving state. In the two latter
+cases the indexer will resume once the reason for the suspension has been resolved.
+
+
+Apart from the normal operation states the indexer service can have an erroneous state. There are two possibilities:
+
+File indexing service failed to initialize, most likely due to an installation problem - This should rarely
+occur that means that a mandatory plugin could not be loaded. This can be due to an installation problem (missing dependency) or due
+to a faulty setup of the &kde; plugin system.
+Any other error means a communication problem with the service. These errors are produced by the &DBus; subsystem and need
+to be evaluated case by case.
+
+
+
+
+
+Indexing
+
+This tab allows to select the files and folders that are to be analyzed by the file indexer explained
+ above. By default Documents, Audio, Images and Videos are selected here.
+
+
+Click the Customize Folders button to select and de-select folders that should be searched for files
+to be analyzed. By default the home folder and all subfolders are analyzed. By simply unchecking a folder it can be excluded.
+It is also possible to include a subfolder of an excluded one by checking it again. This allows a rather fine selection of the
+folders to be analyzed.
+
+Clicking the Advanced button allows to define exclude filters using the mime type or the name of a file.
+The mime types and names of all files found in the configured folders will be matched against these filters. Only if none of them
+matches the file will be analyzed. This is very helpful to exclude log and backup files and the like.
+
+Removable media handling: Nepomuk can index files on removable devices like USB keys or external
+hard-disks for fast desktop searches. By default no files are indexed. Here this behaviour can be changed to one of two options:
+
+Index files on all removable devices - Files on removable media are indexed as soon as the
+medium is mounted. Caution: this does not include media which have been rejected via the second option
+Ask individually when newly mounted - The user will be asked to decide if files on the
+newly mounted medium should be indexed or not. Once decided Nepomuk will not ask again.
+
+
+
+
+Backup
+
+On this tab you can decide to make a backup of all data that could not be restored otherwise. This includes
+manually created tags, ratings but also statistical data. No backup is done as default so you need to decide what you want to do.
+You have two possibilities: automatic backups and manual ones.
+
+
+Automatic Backups
+First choose the Backup Frequency: this is set to Disable Automatic Backups but you
+can choose Daily Backup or Weekly Backup.
+Then set the Backup Time: to anything convenient for you using the spinbox: you can set the hour and minutes
+and the day of the week for weekly backups.
+Finally you can set a limit for the number of backup files using Max Number of Backups:.
+This will ensure you do not waste disk space with the backup files and only the N last files will be kept, N being
+the number you set there, 10 as default.
+Your automatic backups are saved locally in the following directory:
+$KDEHOME/share/apps/nepomuk/backupsync/backups/.
+
+
+
+Tools
+
+Manual Backup...
+You can also perform manual backups. Manual backups will be saved in your chosen location, as a file.
+Click on Manual Backup... and a wizard will guide you. You first need to point to the location
+of the backup file. Enter a full valid path in the field or use the file dialog to point to a file.
+You can create a new file in the folder of your choice and then point to this new file.
+Then click on the Next button and the dialog should report that the backup has been done.
+
+Restore Backup...
+If you want to later restore your backup, use this button and follow the wizard. The backup will be merged
+into the local Nepomuk database.
+
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/netpref/CMakeLists.txt b/doc/kcontrol/netpref/CMakeLists.txt
new file mode 100644
index 00000000..1d634b51
--- /dev/null
+++ b/doc/kcontrol/netpref/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/netpref)
diff --git a/doc/kcontrol/netpref/index.docbook b/doc/kcontrol/netpref/index.docbook
new file mode 100644
index 00000000..d5436bb3
--- /dev/null
+++ b/doc/kcontrol/netpref/index.docbook
@@ -0,0 +1,109 @@
+
+
+
+]>
+
+
+
+Connection Preferences
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+kdebase
+kcontrol
+network
+timeouts
+
+
+
+
+
+
+Connection Preferences
+
+Here you can set timeout values. You might want to tweak them
+if your connection is very slow, but the default settings are
+appropriate for most users.
+
+Here Timeout Values are the length of time
+an application should wait for an answer from a network operation.
+
+You can configure the following timeouts:
+
+
+
+Socket read:
+
+ Some applications use sockets to
+communicate. You can think of a socket as a water tap; while it is
+open, water (or in our case, data) comes out, without any interaction.
+If something stops this flow of data, the application will wait for
+more to come. This could be a very long time, but you can configure a
+maximum time for an application to wait with this option.
+This setting will only apply to &kde; applications, of course.
+
+
+
+
+Proxy connect:
+
+
+Sets how long to wait for a connection to a proxy server, if one is configured.
+
+
+
+
+
+Server connect:
+
+
+Sets how long to wait for a connection to a remote server.
+
+
+
+
+
+Server response:
+
+
+Sets how long to wait for a reply from a remote server.
+
+
+
+
+
+
+You can configure FTP Options here. At
+present there is just two options:
+
+
+Enable passive mode (PASV)
+Passive &FTP; is often required when you are behind a firewall.
+Many firewalls only permit connections that were initiated from
+the inside. Passive &FTP; is controlled by the client,
+which makes it usable through firewalls.
+
+
+
+Mark partially uploaded files
+When a mark is placed in this box, partially uploaded files will
+have a .part extension added to the end
+of the file. This extension is removed once the file download is complete.
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/performance/CMakeLists.txt b/doc/kcontrol/performance/CMakeLists.txt
new file mode 100644
index 00000000..027649ef
--- /dev/null
+++ b/doc/kcontrol/performance/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/performance)
diff --git a/doc/kcontrol/performance/index.docbook b/doc/kcontrol/performance/index.docbook
new file mode 100644
index 00000000..3534dc00
--- /dev/null
+++ b/doc/kcontrol/performance/index.docbook
@@ -0,0 +1,91 @@
+
+
+
+]>
+
+
+
+Performance
+
+&Mike.McBride; &Mike.McBride.mail;
+
+
+
+2009-11-24
+&kde; 4.4
+
+
+KDE
+Systemsettings
+performance
+preload
+
+
+
+
+Performance Settings
+
+&kde;, is used on a wide variety of computers by a wide variety of users. Under the category of
+performance, this dialog allows each user to adjust options which may make the computer that &konqueror; is
+installed on feel more responsive.
+
+&konqueror; instances
+The first section of this dialog is labeled Minimize Memory Usage and has three options which determine maximum number of instances of &konqueror; that can be open on one machine at any one time.
+
+Do not confuse &konqueror; instances, with &konqueror; windows or tabs. The number of &konqueror; instances is determined by &kde; not by the user. You can think of instances as the hidden data of your &konqueror; windows and tabs. One &konqueror; instance can contain the data for multiple windows or tabs. Your choice on the following radio buttons does not limit the number of windows you can open at one time, but rather, how many instances of &konqueror; you can have open.
+The reason the choices you make in this dialog box are important is evident when something goes wrong and &konqueror; is forced to close an instance. All &konqueror; windows associated with a &konqueror; instance must be closed immediatly (without time to save data or bookmark locations). Therefore, the more instances you can have open at one time, the less likely a problem in one instance will affect all of your work. Each instance requires more memory which can be a problem on systems with less system memory.
+
+Your options are:
+
+
+
+Never
+There are no restraints. Any number of &konqueror; instances can be open at any one time. The advantage of this option is if any &konqueror; instance crashes the remaining will be unaffected. The disadvantage is that each &konqueror; instance uses more memory.
+
+
+
+For file browsing only (recommended)
+If this option is selected, you can have as many as you want &konqueror; instances open that are browsing the web, but only one instance of &konqueror; for file management.
+
+
+
+Always (use with care)
+If this option is selected, you can only have one instance of &konqueror; running at any one time. This saves system memory, but if your &konqueror; window crashes, all your browsing windows close immediatly without warning. This should only be used for seriously memory limited systems.
+
+
+
+
+Preloading
+The subsection labeled Preloading also makes a tradeoff between memory and performance.
+
+Preloading refers to loading an instance of &konqueror; into memory before a user asks to start &konqueror;. The positive effect of this is that when a user asks &kde; to load &konqueror; the window appears instantly
+ because most of the application has been preloaded. The negative effect is that this instance of &konqueror; uses memory that
+could be used by other programs. By default, when a user closes &konqueror;, &kde; does not close the instance.
+This means that the next time a user wants &konqueror; loaded, it is nearly instantaneous again.
+The spinbox labeled Maximum number of instances kept preloaded: can be used to adjust the maximum number of preloaded instances. This option does not affect instances when they are loaded. It also does not limit the number of instances that can be used by active windows. It only affects the number of preloaded instances.
+The check box labeled Preload an instance after &kde; startup does just what it says. It tells
+&kde; to preload one instance of &konqueror; at the startup of &kde;.
+This does extend the startup time for &kde;.
+The final check box labeled Always try to have at least one preloaded instance signals to &kde; that you always want &kde; to have one preloaded, but not used, instance of &konqueror; available. This option will actually decrease performance on some machines (especially those with limited physical memory).
+
+
+
+
+
diff --git a/doc/kcontrol/phonon/CMakeLists.txt b/doc/kcontrol/phonon/CMakeLists.txt
new file mode 100644
index 00000000..035c37d9
--- /dev/null
+++ b/doc/kcontrol/phonon/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/phonon)
diff --git a/doc/kcontrol/phonon/index.docbook b/doc/kcontrol/phonon/index.docbook
new file mode 100644
index 00000000..eed863c8
--- /dev/null
+++ b/doc/kcontrol/phonon/index.docbook
@@ -0,0 +1,93 @@
+
+
+
+]>
+
+Audio and Video Settings
+
+
+MatthiasKretz
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+hardware
+multimedia
+sound
+video
+backend
+
+
+
+
+This &systemsettings; module allows you to configure the sound and video device
+preference and the backends used by Phonon.
+
+
+
+Device Preference tab
+
+On the left you are presented a tree list with various categories of playback and recording.
+For each category you may choose what device you wish to use.
+The Audio Playback and Audio Recording
+items define the default ordering of devices which can be overridden by
+each sub items.
+Clicking the Apply Device List To button shows a dialog
+which enables you to copy the selected setting from one category to many others.
+Highlight a category and the available devices for this category are displayed in the
+list on the right. The order in this list determines the preference of the output and capture
+devices. If for some reason the first device cannot be used Phonon will try to use the second, &etc;
+Use the Prefer and Defer buttons to change the order
+and the Test button to play a test sound on the selected device.
+
+
+
+Audio Hardware Setup tab
+
+The various drop down boxes in this tab allow full control over all cards that are attached
+to the system.
+
+
+Hardware
+Select the Sound Card and an available
+Profile to be used.
+
+
+Device Configuration
+Select the Sound Device and a Connector.
+
+
+Speaker Placement and Testing or Input Levels
+
+For a playback device: The buttons on this pane allow you to test each speaker separately.
+
+For a recording device: A slider shows the Input Levels
+of the selected Connector.
+
+
+
+
+
+
+
+
+
+Backend tab
+
+On the left side of this module a list of Phonon backends found on your system is shown.
+The order here determines the order Phonon will use the backends.
+Use the Prefer and Defer buttons
+to change this order.
+
+
+
+
+
+
diff --git a/doc/kcontrol/proxy/CMakeLists.txt b/doc/kcontrol/proxy/CMakeLists.txt
new file mode 100644
index 00000000..7777c4ec
--- /dev/null
+++ b/doc/kcontrol/proxy/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/proxy)
diff --git a/doc/kcontrol/proxy/index.docbook b/doc/kcontrol/proxy/index.docbook
new file mode 100644
index 00000000..ec5d7777
--- /dev/null
+++ b/doc/kcontrol/proxy/index.docbook
@@ -0,0 +1,209 @@
+
+
+
+]>
+
+
+Proxy
+
+
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+proxy
+proxies
+
+
+
+
+Proxies
+
+
+
+Introduction
+
+Proxies are programs running on a computer that acts a server on
+the network you are connected to (whether by modem or other
+means). These programs receive &HTTP; and &FTP; requests, retrieve the
+relevant files from the internet, and pass them on to the client
+computer that made the requests.
+
+When you have configured a proxy, &HTTP; and/or &FTP; requests
+are re-routed through the computer that is acting as a proxy server.
+However, you can also select specific hosts which should be contacted
+directly, rather than through the proxy server. If you are on a local
+network, for example, access to local hosts probably doesn't need to
+go through a proxy server.
+
+You should only need to configure a proxy server if your network
+administrator requires it (if you are a dial-up user, that would be
+your internet service provider or ISP). Otherwise,
+especially if you are feeling a bit confused about this proxy
+business, but everything seems to be fine with your internet
+connection, you don't need to change anything.
+
+Please note that using proxy servers is optional, but has the
+benefit or advantage of giving you faster access to data on the
+internet.
+
+If you are uncertain whether or not you need to use a proxy
+server to connect to the internet, please consult with your internet
+service provider's setup guide or your system administrator.
+
+
+
+
+
+Use
+
+
+
+No Proxy
+
+
+Select this option if you do not want to use a proxy server
+and connect to the Internet directly.
+
+
+
+
+If you have decided to use a proxy, you have several methods to
+configure the settings for it.
+
+
+
+Detect proxy configuration automatically
+
+
+Select this option if you want the proxy setup configuration
+script file to be automatically detected and downloaded.
+This option only differs from the next choice in that it
+does not require you to supply the location of
+the configuration script file. Instead, it will be automatically
+downloaded using Web Proxy Auto-Discovery
+(WPAD) protocol.
+
+If you have a problem using this setup, please consult the
+FAQ section at http://www.konqueror.org for
+more information.
+
+
+
+
+Use proxy auto configuration URL
+
+Select this option if your proxy support is provided through a
+script file located at a specific address. You can then enter the
+address in the location text box, or use the folder
+icon to browse to it.
+
+
+
+
+Use system proxy configuration
+
+Some systems are setup with $HTTP_PROXY to allow
+graphical as well as non-graphical applications to share the same
+proxy configuration information.
+If you know this applies to you, select this option and click on
+the Auto Detect button to provide the environment
+variable names used to set the address of the proxy server(s).
+
+In the Exceptions field enter the environment variable,
+⪚ $NO_PROXY, used to store the
+addresses of sites for which the proxy server should not be used.
+Use Show the value of the environment variables to
+show the value of an environment variable instead of its name.
+However it is not possible to edit the values of environment variables in this module.
+
+
+
+
+
+Use manually specified proxy configuration
+
+
+The complete addressing information for the proxy includes both
+the Internet address and a port number. You should enter these into
+the relevant text boxes. Check Use this proxy server for all
+protocols to copy the addresses and port of the HTTP proxy server
+into all other proxy fields, in order to help save some typing.
+
+
+
+Exceptions
+
+Enter a comma separated list of hostnames or ip addresses that should
+be excluded from using the above proxy settings. If you want to exclude all
+hosts for a given domain, then simply enter the domain name preceded by a dot.
+For example, to exclude all hostnames for kde.org, enter .kde.org.
+Wildcard characters such as * or ?
+are not supported and will have no effect.
+Additionally, you can also enter IP addresses, e.g. 127.0.0.1 and
+IP addresses with a subnet, e.g. 192.168.0.1/24.
+
+
+
+
+You can also choose Use proxy settings only for addresses
+in the Exceptions list.
+
+Check this box to reverse the use of the exception list, &ie;
+the proxy servers will only be used when the requested &URL; matches
+one of the addresses listed here.
+
+This feature is useful if all you need is a proxy to access a
+few specific sites, for example, an internal intranet. If you have
+more complex requirements you might want to use a configuration
+script.
+
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/smb/CMakeLists.txt b/doc/kcontrol/smb/CMakeLists.txt
new file mode 100644
index 00000000..295359ac
--- /dev/null
+++ b/doc/kcontrol/smb/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/smb)
diff --git a/doc/kcontrol/smb/index.docbook b/doc/kcontrol/smb/index.docbook
new file mode 100644
index 00000000..70d331d8
--- /dev/null
+++ b/doc/kcontrol/smb/index.docbook
@@ -0,0 +1,104 @@
+
+
+
+]>
+
+
+
+Windows Shares
+
+&Mike.McBride; &Mike.McBride.mail;
+&Jost.Schenck; &Jost.Schenck.mail;
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+Windows shares
+
+
+
+Windows Shares
+
+
+Introduction
+
+In many small local area networks, the SMB
+protocol is used to offer network services. Names like
+&Windows; Network or &Windows; for Workgroups
+Network or LanManager are often used as
+well. Using SMB you can access so-called
+shares (&ie; folders made available by the server)
+as well as printers.
+
+&kde; comes with built-in support for the SMB
+protocol. As &kde; is network-transparent that means you can access
+SMB shares from everywhere you can access your
+local files, for example in the &konqueror; file manager and in the
+file dialog. To make use of this you should provide &kde; with some
+information on your SMB network. But don't worry,
+this is normally pretty simple as, for example, all the Windows
+clients in your network need and have the same information.
+
+
+
+
+
+For the SMB protocol to work, it is
+required to have Samba correctly
+installed.
+
+
+
+
+
+
+Use
+
+Although there are a lot of insecure SMB
+networks out there which allow access to anyone, in principle you have
+to authenticate yourself to access the services of an
+SMB server. By default, &kde; will use the data
+entered in the Default user name and
+Default password fields to authenticate itself on
+SMB hosts. If you leave the field Default
+user name empty, &kde; will try to access
+SMB hosts without a username. If you leave the
+default password empty, it will try without a password. If &kde; is
+unsuccessful accessing the host using these settings, you will be
+asked for a username and a password.
+
+While it makes things more comfortable if &kde;
+stores your SMB password, this may be a security
+problem. If you are using SMB in a security
+conscious environment, you should not store your password here but
+rather enter it anew every time you need to access an
+SMB host.
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/solid-device-automounter/CMakeLists.txt b/doc/kcontrol/solid-device-automounter/CMakeLists.txt
new file mode 100644
index 00000000..4b626ed6
--- /dev/null
+++ b/doc/kcontrol/solid-device-automounter/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/solid-device-automounter)
diff --git a/doc/kcontrol/solid-device-automounter/index.docbook b/doc/kcontrol/solid-device-automounter/index.docbook
new file mode 100644
index 00000000..4197374b
--- /dev/null
+++ b/doc/kcontrol/solid-device-automounter/index.docbook
@@ -0,0 +1,102 @@
+
+
+
+]>
+
+Removable Devices
+
+
+TreverFischer
+
+
+
+2012-12-05
+&kde; 4.12
+
+
+KDE
+Systemsettings
+automount
+device
+
+
+
+
+This dialog allows you to configure automatic handling of removable storage media.
+
+
+If you enable the automatic mounting features in this module, you will not need to use
+the device notifier applet or the navigation panel in the file manager to get access to a
+recently plugged in device.
+
+
+At the top of the dialog you find the global settings, which can be overridden
+for each single device in the Device Overrides list.
+For a single-user desktop it is recommended to have all the
+check boxes above the overrides list enabled.
+
+
+Enable automatic mounting of removable media
+
+When this is unchecked, no device automounting of any kind will happen,
+regardless of anything selected in the Device Overrides section.
+
+
+
+Only automatically mount removable media that has been
+manually mounted before
+
+When this is checked, &kde; will only automatically mount devices it
+remembers. A device is remembered if it has ever been mounted before; ⪚
+plugging in a USB media player to charge is not sufficient to remember it.
+If the files are not accessed, &kde;
+will not automatically mount the player next time it is seen. Once they have
+been accessed, however, &kde; will remember to automatically make the contents
+accessible to your system.
+
+
+
+Mount all removable media at login
+
+If any removable storage devices are connected to your system when you login
+to your desktop, &kde; will automatically make the contents available to your
+system for other programs to read.
+
+
+
+Automatically mount removable media when attached
+
+When this is checked, &kde; will automatically make the contents of any
+storage device available to the system when it is plugged in or attached.
+
+
+
+Device Overrides
+
+This list contains the storage devices known to &kde;. If Automount on Login
+is checked, the device will be automatically mounted even though Mount
+all removable media at login is unchecked. The same applies for
+Automount on Attach.
+
+If Enable automatic mounting of removable media is unchecked, the
+overrides do not apply and no devices will be automatically mounted.
+
+
+
+Forget Device
+
+Clicking this button causes &kde; to forget that the selected devices ever
+existed. This is only useful if Only automatically mount removable media
+that has been manually mounted before is checked. Once a device is
+forgotten and &kde; is set to only automatically mount familiar devices, the
+device will not be automatically mounted.
+
+
+
+
+
+
+
+
diff --git a/doc/kcontrol/spellchecking/CMakeLists.txt b/doc/kcontrol/spellchecking/CMakeLists.txt
new file mode 100644
index 00000000..1e15f569
--- /dev/null
+++ b/doc/kcontrol/spellchecking/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/spellchecking)
diff --git a/doc/kcontrol/spellchecking/index.docbook b/doc/kcontrol/spellchecking/index.docbook
new file mode 100644
index 00000000..59526340
--- /dev/null
+++ b/doc/kcontrol/spellchecking/index.docbook
@@ -0,0 +1,119 @@
+
+
+
+
+]>
+
+
+
+Spell Checker
+
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+
+
+
+2013-12-05
+&kde; 4.12
+
+
+KDE
+Spelling
+dictionary
+
+
+
+
+
+
+
+Spell Checker
+The configuration options available here are used as default by all &kde;
+applications that use &sonnet;, which is a frontend to various free spell checkers.
+
+To use &sonnet; you need to install spell checkers like ⪚
+GNU Aspell,
+Enchant,
+Hspell,
+ISpell or
+Hunspell
+and additionally the corresponding dictionaries for your language.
+
+The configuration options selected here can be overridden by each application.
+
+In the drop down box Default language choose from the
+available dictionaries, which one to use for &sonnet;.
+
+
+Spell Options
+
+
+
+
+Automatic spell checking enabled by default
+
+If a mark is placed in this checkbox, the spelling of words will be check in your document
+as you type them. Misspelled will have a red line drawn under them.
+
+
+
+
+
+Skip all uppercase words
+
+If a mark is placed in this checkbox, the spelling of any word which consists of all capital
+letters will not be checked.
+This is useful for document using a large number of acronyms. If this box is left unchecked,
+most of those acronyms will be incorrectly marked. By placing a mark in this checkbox,
+the acronyms will not be marked as misspelled.
+
+
+
+
+Skip run-together words
+If this box is not checked, then words that appear in the
+dictionary separately, but have been run together, are considered to be
+spelling errors. Examples of such words are shutout, cannot, and blackout.
+
+
+Checking this box will help prevent applications from flagging website and email addresses
+for spelling errors. These addresses often contain words run together.
+
+
+
+
+
+
+Ignoring words
+The bottom half of the dialog box allows you to designate specific words (they may be specialized terminology, proper names, &etc;) which
+should be ignored by the spelling program.
+
+Adding a word to the ignore list
+To add a word, type the word in the text box and click the Add button.
+
+
+Deleting a word from the ignore list
+To remove a word, select the word in the listbox containing all the currently ignored words by clicking on it with
+the &LMB;. Now click the Remove button.
+
+
+Changing the order a word appears in the list
+To move a word in the list, select the word in the listbox containing all the currently ignored words by clicking on it with
+the &LMB;. Now click the Move Up button or the Move Down button to move the word
+within the list.
+
+When you are happy with the changes, simply click
+Apply.
+
+Clicking on the Defaults button restores all
+values to their default values.
+
+
+
+
+
diff --git a/doc/kcontrol/trash/CMakeLists.txt b/doc/kcontrol/trash/CMakeLists.txt
new file mode 100644
index 00000000..559f8e34
--- /dev/null
+++ b/doc/kcontrol/trash/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/trash)
diff --git a/doc/kcontrol/trash/index.docbook b/doc/kcontrol/trash/index.docbook
new file mode 100644
index 00000000..099d6db2
--- /dev/null
+++ b/doc/kcontrol/trash/index.docbook
@@ -0,0 +1,65 @@
+
+
+
+]>
+
+Trash
+
+
+&Burkhard.Lueck;
+
+
+
+2009-11-24
+&kde; 4.4
+
+
+KDE
+Systemsettings
+trash
+
+
+
+
+This module allows you to configure the settings for the trash.
+
+
+
+Delete files older than
+
+Check this box to allow automatic deletion of files that are
+older than the value specified. Leave this disabled to not
+automatically delete any items after a certain timespan.
+Set the number of days that files can remain in the trash. Any files
+older than this will be automatically deleted.
+
+
+
+Limit to maximum size
+
+Check this box to limit the trash to the maximum amount of disk space
+that you specify below. Otherwise, it will be unlimited.
+
+
+
+Maximum size
+
+This is the maximum percent of disk space that will be used for the
+trash. The calculated amount of disk space that will be allowed for
+the trash is displayed right of the spinbox.
+
+
+
+When limit reached
+
+When the size limit is reached, the selected action will be performed,
+either the oldest or biggest files will be deleted automatically
+or you will be warned.
+
+
+
+
+
+
diff --git a/doc/kcontrol/useragent/CMakeLists.txt b/doc/kcontrol/useragent/CMakeLists.txt
new file mode 100644
index 00000000..c350c7bc
--- /dev/null
+++ b/doc/kcontrol/useragent/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcontrol/useragent)
diff --git a/doc/kcontrol/useragent/index.docbook b/doc/kcontrol/useragent/index.docbook
new file mode 100644
index 00000000..816e379f
--- /dev/null
+++ b/doc/kcontrol/useragent/index.docbook
@@ -0,0 +1,110 @@
+
+
+
+]>
+
+
+Browser Identification
+
+
+&Krishna.Tateneni; &Krishna.Tateneni.mail;
+
+
+
+2009-11-24
+&kde; 4.4
+
+
+KDE
+Systemsettings
+user agent
+browser
+identification
+
+
+
+
+
+Browser Identification
+
+
+
+Introduction
+
+When &konqueror; connects to a web site to retrieve information,
+some basic identifying information is sent to the web site in the form
+of a User Agent header.
+
+Because of minor differences in the way that different web
+browsers function, web sites that rely too much on a single browser may
+sometimes not display as intended when viewed using another
+browser. Some web sites are smart enough to examine the contents of the
+user agent header and incorporate this information in the
+&HTML; code so that the content is displayed correctly
+regardless of the browser used.
+
+However, you may find that some web sites refuse to function
+correctly unless you are using a browser recognized as
+proper by that site. In these cases, you may find it
+necessary to fool the web site by having &konqueror; report itself to be
+another browser by means of the user agent header.
+
+
+
+
+Use
+
+In this module you can configure the
+type of browser that &konqueror; will report itself to be. You can
+control this information by web site. Usually, the list box that is
+labeled Site Specific Identification will be
+empty, so that &konqueror; will always use its default useragent
+string.
+
+You can disable the sending of a user agent entirely, by
+unchecking the Send identification
+check box. This may cause strange behavior on some sites, and may even
+deny you access to some websites, so disable this with caution.
+
+To configure a new agent binding, press the
+New... button. Type the name of the server or
+a domain in the text box at the top of the dialog that pops up, which
+is labeled When browsing the following
+site.
+
+Note that you can not use the wildcard
+character * in this text box. However, the string
+kde.org will match all hosts in the domain
+kde.org
+
+After typing the name of the server, type in the identifying
+string in the next combo box, which is labeled Use the
+following identification:, or choose a string from the list. If
+you don't choose a string from the list, you will need to know what a
+valid string from the browser looks like. For example, you could type
+Mozilla/4.0 (compatible; MSIE 4.0).
+
+You can click on an existing entry in the list, and then modify the contents of the
+text boxes, followed by clicking Change....
+
+The Delete button can be used to delete
+the selected entry in the list of configured agent bindings. The
+Delete All will remove all the configured user
+agent strings. Click the Apply to take your
+changes in effect.
+
+You can use the check boxes at the top of the screen to build a
+user agent that is uniquely yours, by choosing your own combination of
+operating system name and version, platform, processor type, and
+language.
+
+In all cases, the user agent that is being sent by default is
+displayed in bold text at the top of the page.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/kdebugdialog/CMakeLists.txt b/doc/kdebugdialog/CMakeLists.txt
new file mode 100644
index 00000000..cad13c8f
--- /dev/null
+++ b/doc/kdebugdialog/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+#
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en)
diff --git a/doc/kdebugdialog/index.docbook b/doc/kdebugdialog/index.docbook
new file mode 100644
index 00000000..b3250911
--- /dev/null
+++ b/doc/kdebugdialog/index.docbook
@@ -0,0 +1,138 @@
+
+KDebugDialog">
+
+
+
+
+
+]>
+
+
+KDebugDialog
+
+
+&David.Faure; &David.Faure.mail;
+
+
+
+2011-12-20
+1.0 &kde; 4.8
+
+
+KDE
+KDebugdialog
+Debug
+
+
+
+
+&kdebugdialog; is a dialog box for managing diagnostic messages at runtime.
+It features a simple and a full mode.
+In order to be able to make changes
+Disable all debug output has to be unchecked.
+
+
+
+Simple mode
+
+If you simply start kdebugdialog, you will
+see a list of areas, that can be disabled or enabled. A
+kDebug(area) call in the code will show
+something in the debug output only if the area is enabled.
+
+Note that kWarning, kError and kFatal always appear,
+they are NOT controlled by this setting.
+
+Enter a matching string into the Search
+box at the top of the list, this allows you to filter the areas
+which are displayed in the list view.
+Use the buttons below the list to select or deselect all items in the view
+(the other areas are not effected) or change the debug output for a single
+item using the check box in front of it.
+
+
+
+
+
+
+Full mode
+
+If you start kdebugdialog
+, then for every severity level you can
+define separately what should be done with the diagnostic messages of
+that level, and the same for each debug area.
+
+In full mode, first you should select the debug area you are
+interested in from the list at the left of the dialog using the
+search box at the top of the list.
+
+You may independently set the output for various types of
+messages:
+
+
+Information
+Warning
+Error
+Fatal Error
+
+
+For each of these types, you can set the following:
+
+
+
+Output to:
+
+In this Combobox, you can choose where the messages
+should be output. The choices are: File, Message
+Box, Shell (meaning stderr) and
+Syslog. Please do not direct fatal messages to syslog
+unless you are the system administrator yourself. The default is
+Shell.
+
+
+
+
+Filename:
+This is only enabled when you have chosen
+File as the output and provides the name of that file
+(which is interpreted as relative to the current folder). The
+default is kdebug.dbg.
+
+
+
+
+Apart from this, you can also tick the check box Abort
+on fatal errors. In this case, if a diagnostic message with
+the severity level KDEBUG_FATAL is
+output, the application aborts with a SIGABRT after outputting the
+message.
+
+
+
+
+
+When you close the dialog by pressing OK,
+your entries apply immediately and are saved in
+$KDEHOME/share/config/kdebugrc. When you press
+Cancel, your entries are discarded and the old
+ones are restored.
+
+Credits to Kalle Dalheimer for the original version of
+&kdebugdialog;
+
+
+
+&underFDL;
+
+
+
+
diff --git a/doc/kdesu/CMakeLists.txt b/doc/kdesu/CMakeLists.txt
new file mode 100644
index 00000000..e78f6bd5
--- /dev/null
+++ b/doc/kdesu/CMakeLists.txt
@@ -0,0 +1,7 @@
+########### install files ###############
+#
+
+#
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en)
+
+kde4_create_manpage(man-kdesu.1.docbook 1 INSTALL_DESTINATION ${MAN_INSTALL_DIR})
diff --git a/doc/kdesu/index.docbook b/doc/kdesu/index.docbook
new file mode 100644
index 00000000..dee6f311
--- /dev/null
+++ b/doc/kdesu/index.docbook
@@ -0,0 +1,339 @@
+
+
+
+
+
+]>
+
+
+
+
+The &kdesu; handbook
+
+
+&Geert.Jansen; &Geert.Jansen.mail;
+
+
+
+
+2000
+&Geert.Jansen;
+
+
+&FDLNotice;
+
+2010-09-21
+&kde; 4.5
+
+
+&kdesu; is a graphical front end for the &UNIX;
+su command.
+
+
+KDE
+su
+password
+root
+
+
+
+
+
+Introduction
+
+
+
+Welcome to &kdesu;! &kdesu; is a graphical front end for the
+&UNIX; su command for the K Desktop Environment.
+It allows you to run a program as different user by supplying the
+password for that user. &kdesu; is an unprivileged program; it uses
+the system's su.
+
+&kdesu; has one additional feature: it can remember passwords
+for you. If you are using this feature, you only need to enter the
+password once for each command. See for more information on this and a
+security analysis.
+
+This program is meant to be started from the command line or
+from .desktop files. Although it asks for the
+root password using a &GUI;
+dialog, I consider it to be more of a command line <-> &GUI;
+glue instead of a pure &GUI; program.
+
+Since kdesu is no longer installed in
+$(kde4-config --prefix)/bin but in kde4-config --path libexec
+and therefore not in your Path, you have to use $(kde4-config
+--path libexec)kdesu to launch kdesu.
+
+
+
+Using &kdesu;
+
+Usage of &kdesu; is easy. The syntax is like this:
+
+
+kdesu
+
+ command
+
+ file
+ icon name
+
+ priority
+
+
+
+ user
+
+ winid
+
+
+
+kdesu
+&kde; Generic Options
+&Qt; Generic Options
+
+
+The command line options are explained below.
+
+
+
+
+This specifies the command to run as root. It has to be passed
+in one argument. So if, for example, you want to start a new file manager, you
+would enter at the prompt: $(kde4-config --path libexec)kdesu
+
+
+
+Show debug information.
+
+
+
+This option allow efficient use of &kdesu; in
+.desktop files. It tells &kdesu; to examine the
+file specified by file. If this file is
+writable by the current user, &kdesu; will execute the command as the
+current user. If it is not writable, the command is executed as user
+user (defaults to root).
+file is evaluated like this: if
+file starts with a /, it is
+taken as an absolute filename. Otherwise, it is taken as the name of a
+global &kde; configuration file.
+
+
+icon name
+Specify icon to use in the password dialog. You may specify
+just the name, without any extension.
+For instance to run &konqueror; in filemanager mode and show the
+&konqueror; icon in the password dialog:
+$(kde4-config --path libexec)kdesu
+
+
+
+
+
+
+Do not keep the password. This disables the keep
+password checkbox in the password dialog.
+
+
+priority
+
+Set priority value. The priority is an arbitrary number between 0 and
+100, where 100 means highest priority, and 0 means lowest. The default is
+50.
+
+
+
+
+Use realtime scheduling.
+
+
+
+
+
+Stop the kdesu daemon. See .
+
+
+
+Enable terminal output. This disables password keeping. This is
+largely for debugging purposes; if you want to run a console mode app, use the
+standard su instead.
+
+
+ user
+While the most common use for &kdesu; is to run a command as
+the superuser, you can supply any user name and the appropriate
+password.
+
+
+
+
+
+
+
+
+Internals
+
+
+X authentication
+
+The program you execute will run under the root user id and will
+generally have no authority to access your X display. &kdesu; gets
+around this by adding an authentication cookie for your display to a
+temporary .Xauthority file. After the command
+exits, this file is removed.
+
+If you don't use X cookies, you are on your own. &kdesu; will
+detect this and will not add a cookie but you will have to make sure
+that root is allowed to access to your display.
+
+
+
+
+Interface to su
+
+&kdesu; uses the sytem's su for acquiring
+priviliges. In this section, I explain the details of how &kdesu; does
+this.
+
+Because some su implementations (&ie; the one
+from &RedHat;) don't want to read the password from
+stdin, &kdesu; creates a pty/tty pair and executes
+su with its standard filedescriptors connected to
+the tty.
+
+To execute the command the user selected, rather than an
+interactive shell, &kdesu; uses the argument with
+su. This argument is understood by every shell that
+I know of so it should work portably. su passes
+this argument to the target user's shell, and the
+shell executes the program. Example command: su .
+
+Instead of executing the user command directly with
+su, &kdesu; executes a little stub program called
+kdesu_stub. This stub (running as the
+target user), requests some information from &kdesu; over the pty/tty
+channel (the stub's stdin and stdout) and then executes the user's
+program. The information passed over is: the X display, an X
+authentication cookie (if available), the PATH and the
+command to run. The reason why a stub program is used is that the X
+cookie is private information and therefore cannot be passed on the
+command line.
+
+
+
+
+Password Checking
+
+&kdesu; will check the password you entered and gives an error
+message if it is not correct. The checking is done by executing a test
+program: /bin/true. If this succeeds, the
+password is assumed to be correct.
+
+
+
+
+Password Keeping
+
+For your comfort, &kdesu; implements a keep
+password feature. If you are interested in security, you
+should read this paragraph.
+
+Allowing &kdesu; to remember passwords opens up a (small)
+security hole in your system. Obviously, &kdesu; does not allow
+anybody but your user id to use the passwords, but, if done without
+caution, this would lowers root's security level to that of a
+normal user (you). A hacker who breaks into your account, would get
+root access. &kdesu; tries
+to prevent this. The security scheme it uses is, in my opinion at
+least, reasonably safe and is explained here.
+
+&kdesu; uses a daemon, called
+kdesud. The daemon listens to a &UNIX;
+socket in /tmp for commands. The mode of the
+socket is 0600 so that only your user id can connect to it. If
+password keeping is enabled, &kdesu; executes commands through this
+daemon. It writes the command and root's password to the socket and the
+daemon executes the command using su, as describe
+before. After this, the command and the password are not thrown
+away. Instead, they are kept for a specified amount of time. This is
+the timeout value from in the control module. If another request for
+the same command is coming within this time period, the client does
+not have to supply the password. To keep hackers who broke into your
+account from stealing passwords from the daemon (for example, by
+attaching a debugger), the daemon is installed set-group-id
+nogroup. This should prevent all normal users (including you) from
+getting passwords from the kdesud
+process. Also, the daemon sets the DISPLAY environment
+variable to the value it had when it was started. The only thing a
+hacker can do is execute an application on your display.
+
+One weak spot in this scheme is that the programs you execute
+are probably not written with security in mind (like setuid
+root programs). This means
+that they might have buffer overruns or other problems and a hacker
+could exploit those.
+
+The use of the password keeping feature is a tradeoff between
+security and comfort. I encourage you to think it over and decide for
+yourself if you want to use it or not.
+
+
+
+
+
+Author
+
+&kdesu;
+
+Copyright 2000 &Geert.Jansen;
+
+&kdesu; is written by &Geert.Jansen;. It is somewhat based on
+Pietro Iglio's &kdesu;, version 0.3. Pietro and I agreed that I will
+maintain this program in the future.
+
+The author can be reached through email at &Geert.Jansen.mail;.
+Please report any bugs you find to me so that I can fix them. If you
+have a suggestion, feel free to contact me.
+
+
+
+&underFDL;
+&underArtisticLicense;
+
+
+
+
+
+
diff --git a/doc/kdesu/man-kdesu.1.docbook b/doc/kdesu/man-kdesu.1.docbook
new file mode 100644
index 00000000..9de4f05e
--- /dev/null
+++ b/doc/kdesu/man-kdesu.1.docbook
@@ -0,0 +1,194 @@
+
+
+]>
+
+
+
+KDE User's Manual
+&Lauri.Watts; &Lauri.Watts.mail;
+2010-09-18
+K Desktop Environment
+
+
+
+kdesu
+1
+
+
+
+kdesu
+Runs a program with elevated privileges
+
+
+
+
+kdesu
+
+ command
+
+ file
+ icon name
+
+ priority
+
+
+
+ user
+
+ winid
+
+
+
+kdesu
+KDE Generic Options
+Qt Generic Options
+
+
+
+
+Description
+&kdesu; is a graphical front end for the
+&UNIX; su command for the K Desktop Environment.
+It allows you to run a program as different user by supplying the
+password for that user. &kdesu; is an unprivileged program; it uses
+the system's su.
+
+&kdesu; has one additional feature: it can optionally remember passwords
+for you. If you are using this feature, you only need to enter the
+password once for each command.
+
+This program is meant to be started from the command line or
+from .desktop files.
+
+Since kdesu is no longer installed in
+$(kde4-config --prefix)/bin but in kde4-config --path libexec
+and therefore not in your Path, you have to use $(kde4-config
+--path libexec)kdesu to launch kdesu.
+
+
+
+Options
+
+
+
+
+This specifies the command to run as root. It has to be passed
+in one argument. So if, for example, you want to start a new file manager, you
+would enter at the prompt: $(kde4-config --path libexec)kdesu
+
+
+
+Show debug information.
+
+
+
+This option allow efficient use of &kdesu; in
+.desktop files. It tells &kdesu; to examine the
+file specified by file. If this file is
+writable by the current user, &kdesu; will execute the command as the
+current user. If it is not writable, the command is executed as user
+user (defaults to root).
+file is evaluated like this: if
+file starts with a /, it is
+taken as an absolute filename. Otherwise, it is taken as the name of a
+global &kde; configuration file.
+
+
+icon name
+Specify icon to use in the password dialog. You may specify
+just the name, without any extension.
+
+
+
+
+
+Do not keep the password. This disables the keep
+password checkbox in the password dialog.
+
+
+priority
+
+Set priority value. The priority is an arbitrary number between 0 and
+100, where 100 means highest priority, and 0 means lowest. The default is
+50.
+
+
+
+
+Use realtime scheduling.
+
+
+
+
+
+Stop the kdesu daemon. This is the daemon that caches
+successful passwords in the background. This feature may also be disabled with
+ when &kdesu; is initially run.
+
+
+
+Enable terminal output. This disables password keeping. This is
+largely for debugging purposes; if you want to run a console mode app, use the
+standard su instead.
+
+
+ user
+While the most common use for &kdesu; is to run a command as
+the superuser, you can supply any user name and the appropriate
+password.
+
+
+
+
+
+Do not display an ignore button.
+
+
+
+
+ winid
+Makes the dialog transient for an X app specified by winid.
+
+
+
+
+
+
+
+
+See Also
+su(1)
+
+More detailed user documentation is available from help:/kdesu
+(either enter this URL into &konqueror;, or run
+khelpcenter
+help:/kdesu).
+
+
+
+
+Examples
+Run kfmclient as user jim, and show the &konqueror; icon in the
+password dialog:
+$(kde4-config --path libexec)kdesukfmclient
+
+
+
+
+Authors
+&kdesu; was written by
+GeertJansenjansen@kde.org
+and PietroIglio
+iglio@fub.it.
+
+
+
+
diff --git a/doc/khelpcenter/CMakeLists.txt b/doc/khelpcenter/CMakeLists.txt
new file mode 100644
index 00000000..d5868ac2
--- /dev/null
+++ b/doc/khelpcenter/CMakeLists.txt
@@ -0,0 +1,5 @@
+########### install files ###############
+#
+#
+#
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en)
diff --git a/doc/khelpcenter/background.png b/doc/khelpcenter/background.png
new file mode 100644
index 00000000..65459539
Binary files /dev/null and b/doc/khelpcenter/background.png differ
diff --git a/doc/khelpcenter/bgtable.png b/doc/khelpcenter/bgtable.png
new file mode 100644
index 00000000..145bbd48
Binary files /dev/null and b/doc/khelpcenter/bgtable.png differ
diff --git a/doc/khelpcenter/index.docbook b/doc/khelpcenter/index.docbook
new file mode 100644
index 00000000..84bbad86
--- /dev/null
+++ b/doc/khelpcenter/index.docbook
@@ -0,0 +1,906 @@
+
+
+
+
+]>
+
+
+
+The &khelpcenter;
+
+The &kde; Team
+
+
+&FDLNotice;
+2013-05-22
+&kde; 4.11
+
+
+
+&kde; is an international technology team that creates
+Free Software
+for desktop and portable computing. Among &kde;'s products are a modern
+desktop system for &Linux; and &UNIX; platforms, comprehensive office
+productivity and groupware suites and hundreds of software titles in many
+categories including Internet and web applications, multimedia, entertainment,
+educational, graphics and software development.
+
+
+
+
+KDE
+kdebase
+khelpcenter
+kdehelp
+help
+help center
+KDE help center
+
+
+
+
+
+
+&kde; Help System Handbook
+
+
+
+&kde; Help System
+
+The &kde; help system is designed to make accessing the common
+&UNIX; help systems (man and
+info) simple, as well as the native &kde;
+documentation (&XML;).
+
+
+
+All base &kde; applications come fully documented, thanks to the efforts of the
+Documentation team. If you are interested in helping with the documentation
+efforts, join the
+mailing
+list and write to the team at kde-doc-english@kde.org. No
+experience is required, just enthusiasm and patience.
+
+
+
+If you would like to help translating &kde; documentation to your native
+language, review the information, including coordinators for each language team,
+on the Localization web site.
+
+
+
+Installation
+
+
+&khelpcenter; is an integral part of the &kde; Base installation, and
+is installed with every copy of &kde;. It can be found in the kdebase-runtime
+package, and is available from the &kde-ftp;, or will be found in your
+operating system's kdebase-runtime package.
+
+
+
+
+
+
+Invoking Help
+
+
+&khelpcenter; can be called in several ways:
+
+
+
+
+From the Help menu
+
+
+The most common will probably be from within an application. Choose
+
+
+F1
+
+Help
+Application Handbook to open that
+application's handbook.
+
+
+
+
+
+From the Kickoff Application Launcher
+
+
+Choose the big K in your panel, and select the
+Applications tab followed by selecting
+Help to open &khelpcenter;, which will open up to the
+default start page.
+
+
+
+
+
+From the command line
+
+
+&khelpcenter; may be started using a &URL; to display a
+file. &URL;s have been added for
+info and man pages
+also. You can use them as follows:
+
+
+
+
+An application help file
+
+
+khelpcenter
+
+
+
+Opens the &kwrite; help file, at the contents page.
+
+
+
+
+
+A local &URL;
+
+khelpcenter
+
+
+
+
+
+
+A Man page
+
+
+khelpcenter
+
+
+
+
+
+
+An Info page
+
+
+khelpcenter
+
+
+
+
+
+
+
+Invoking khelpcenter with no parameters opens the
+default start page.
+
+
+
+
+
+
+
+
+The &khelpcenter; interface
+
+
+The &khelpcenter; interface consists of two panes of information.
+
+
+
+The toolbar and menus are explained further in .
+
+
+
+Documents contain their own navigation tools, enabling you to move
+either sequentially through a document, using
+Next, Previous, and
+Contents links, or to move around in a less
+structured manner, using hyperlinks.
+
+
+
+Links can take you to other parts of the same document, or to a
+different document, and you can use the Back (Left
+pointing arrow) or Forward (Right pointing arrow)
+icons on the toolbar to move through the documents you have viewed in
+this session.
+
+
+
+The two panes display the contents of the help system, and the help
+files themselves, on the left and right respectively.
+
+
+
+The Contents Pane
+
+
+The contents pane in &khelpcenter; is
+displayed on the left hand side of the window. As you might expect, you
+can move the splitter bar, to make sure you can comfortably read the
+contents of either pane.
+
+
+
+The contents pane is further divided into two
+tabs, one containing a tree view
+showing all the help information &khelpcenter; is aware of, and the
+other contains the &kde; glossary
+of terms.
+
+
+
+The Contents Tab
+
+
+The Contents tab contains the following default
+top level entries in the tree view:
+
+
+
+
+
+&kde; Fundamentals
+
+The Fundamentals introduce you to the many features of the &kde; Software Collection and
+describe many common tasks you can perform in all &kde; applications.
+
+
+
+
+
+Plasma Manual
+
+
+The &plasma; Manual is the documentation for the most visible pillar of &kde;,
+the core interface to the desktop.
+
+
+
+
+
+Online Help
+
+A page with links to online help and additional information provided by the &kde; community.
+
+
+
+
+
+Application Manuals
+
+
+Native &kde; application documentation. All &kde; applications have
+documentation in &XML; format, which are converted to
+HTML when you view them. This section lists all the
+&kde; applications with a brief description and a link to the full
+application documentation.
+
+
+The applications are displayed in a tree structure that echoes the default
+structure of the K menu, making it easy to find the
+application you are looking for.
+
+
+
+
+
+Control Center Modules
+
+
+Provides a list of links to various modules that are located in the &kde;
+&systemsettings; application.
+
+
+
+
+
+KInfoCenter Modules
+
+
+Contains a list of links to various KInfocenter modules documentation.
+
+
+
+
+
+Kioslaves
+
+
+Contains a list of links to various KIO modules documentation.
+
+
+
+
+
+&UNIX; manual pages
+
+
+&UNIX; man pages are the traditional on-line documentation format for
+&UNIX; systems. Most programs on your system will have a man page. In
+addition, man pages exist for programming functions and file
+formats.
+
+
+
+
+
+Scrollkeeper
+
+Additional non-&kde; documentation installed on your system.
+
+
+
+
+
+Browse Info Pages
+
+
+TeXinfo documentation is used by many &GNU; applications,
+including gcc (the C/C++ compiler),
+emacs, and many others.
+
+
+
+
+
+
+
+
+
+
+
+
+The Man and Info
+sections
+
+Man pages are the standard &UNIX; manual pages, and have been in
+use for many years on many operating systems. They are extremely
+thorough, and are the very best place to get information about most
+&UNIX; commands and applications. When people say
+RTFM, the Manual they are referring to is very often the
+man page.
+
+The man pages are not perfect. They tend to be in depth, but
+also extremely technical, often written by developers, and for
+developers. In some cases this makes them somewhat unfriendly, if not
+downright impossible for many users to understand. They are, however,
+the best source of solid information on most command line
+applications, and very often the only source.
+
+If you've ever wondered what the number is when people write
+things like man(1) it means which section of the manual the item is
+in. You will see &khelpcenter; uses the numbers to divide the very many
+man pages into their own sections, making it easier for you to find
+the information you're looking for, if you're just browsing.
+
+Also available are the Info pages, intended to be a replacement
+for the man pages. The maintainer of some applications no longer
+update the man pages, so if there is both a man page and an info page
+available, the info page is probably the most recent. Most
+applications have one or the other though. If the application you are
+looking for help on is a &GNU; utility, you will most likely find it
+has an info page, not a man page.
+
+
+Navigating inside the Info pages
+
+Info documents are arranged hierarchically with each page called
+a node. All info documents have a Top node,
+&ie; the opening page. You can return to the
+Top of an info document by pressing
+Top.
+
+Prev & Next
+are used to move to the previous/next page at the current level of the
+hierarchy.
+
+Clicking on a menu item within a document moves you to a lower
+level in the hierarchy. You may move up the hierarchy by pressing
+Up.
+
+Man is treated similarly to info, with the section index being
+the Top node and each man page on the level below. Man entries are
+one page long.
+
+
+
+
+
+The &kde; glossary
+
+
+The glossary provides a quick reference point, where you can look up
+the definitions of words that may be unfamiliar to you. These range
+from &kde; specific applications and technologies, through to general
+&UNIX; computing terms.
+
+
+
+In the left hand pane you will see a tree view, with two choices:
+Alphabetically or By Topic.
+Both contain the same entries, sorted differently, to allow you to
+quickly find the item of interest.
+
+
+
+Navigate down the tree views to the left, and items you select will be
+displayed on the right.
+
+
+
+
+
+The menus and toolbar
+
+
+&khelpcenter; has a very minimal interface, allowing you to concentrate
+on getting help rather than learning how to use the help browser.
+
+
+
+The icons available to you in the toolbar are as follows:
+
+
+
+Toolbar Icons
+
+
+Table of Contents
+
+
+Go to the main start page of &khelpcenter;.
+
+
+
+
+
+Back
+
+
+Go to the previous page you viewed. Click the check mark right to the icon.
+This displays a list of previously viewed pages. Selecting one
+will take you directly back to that page.
+
+
+
+
+
+Forward
+
+
+Go forward one page. This icon is only active if you have
+already used the Back icon.
+
+
+
+
+
+Copy
+
+
+Copy text to the clipboard to be pasted in another application.
+
+
+
+
+
+Find
+
+
+Find a word or words within the currently visible page.
+
+
+
+
+
+Increase Font Sizes
+
+
+Increase the size of the text in the viewer pane.
+
+
+
+
+
+Decrease Font Sizes
+
+
+Decrease the size of the text in the viewer pane. This icon is only
+enabled if you have previously enlarged the text.
+
+
+
+
+
+
+
+The menus contain the following entries:
+
+
+
+
+File
+
+
+
+
+
+
+
+
+&Ctrl;P
+
+File
+Print
+
+
+
+
+Print the contents of the currently visible page. Handbooks in PDF format you find
+on the &kde; Documentation Server.
+
+
+
+
+
+
+
+
+&Ctrl;Q
+
+File
+Quit
+
+
+
+
+Close and exit &khelpcenter;
+
+
+
+
+
+
+
+
+
+
+Edit
+
+
+
+
+
+
+
+&Ctrl;C
+
+EditCopy
+
+
+
+
+Copy the selected text to the clipboard.
+
+
+
+
+
+
+&Ctrl;A
+Edit
+Select All
+
+
+
+
+Select all the text in the current page.
+
+
+
+
+
+
+&Ctrl;F
+Edit
+Find...
+
+
+
+
+Find a word or words in the currently visible page.
+
+
+
+
+
+
+
+
+
+
+View
+
+
+
+
+View
+Set Encoding
+
+
+
+
+Change the encoding of the current page. Normally, the default setting
+of Default should be sufficient, but if you are
+having problems viewing pages written in languages other than English,
+you may need to choose a specific encoding in this menu.
+
+
+
+
+
+
+
+
+
+
+Go
+
+
+
+
+&Alt;Home
+Go
+Table of Contents
+
+
+Go to the main start page of &khelpcenter;.
+
+
+
+
+
+
+&Ctrl;PgUp
+Go
+Previous Page
+
+
+Go to the previous page of the current documentation.
+
+
+
+
+
+
+&Ctrl;PgDown
+Go
+Next Page
+
+
+Go to the next page of the current documentation.
+
+
+
+
+
+
+&Alt;Left
+Go
+Back
+
+Go back to the previous page you were viewing.
+
+
+
+
+
+&Alt;Right
+Go
+Forward
+
+
+If you have previously moved back with the back icon or menu
+entry, you can work your way forward again with this menu
+entry.
+
+
+
+
+
+
+
+
+
+
+
+Settings
+
+
+
+
+
+
+Settings
+Configure Fonts...
+
+
+
+
+Allows you to configure the font family and size used by &khelpcenter;.
+
+
+
+
+
+
+
+
+
+
+Additionally &khelpcenter; has the common &kde; Settings and Help
+menu items, for more information read the sections about the Settings Menu and Help Menu
+of the &kde; Fundamentals.
+
+
+
+
+
+
+
+Credits and License
+
+&khelpcenter;
+
+Originally developed by &Matthias.Elter; &Matthias.Elter.mail;
+The current maintainer is &Cornelius.Schumacher; &Cornelius.Schumacher.mail;
+
+
+
+&underFDL;
+&underGPL;
+
+
+
+
+
+
+
+
+
diff --git a/doc/khelpcenter/kdelogo2.png b/doc/khelpcenter/kdelogo2.png
new file mode 100644
index 00000000..d2039e2b
Binary files /dev/null and b/doc/khelpcenter/kdelogo2.png differ
diff --git a/doc/khelpcenter/khelpcenter.png b/doc/khelpcenter/khelpcenter.png
new file mode 100644
index 00000000..224084a4
Binary files /dev/null and b/doc/khelpcenter/khelpcenter.png differ
diff --git a/doc/khelpcenter/konq.css b/doc/khelpcenter/konq.css
new file mode 100644
index 00000000..ee75f658
--- /dev/null
+++ b/doc/khelpcenter/konq.css
@@ -0,0 +1,68 @@
+body {background-color: #3679AD;
+ color: #000000;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 5;
+ padding: 0;
+ background-image: url(background.png);
+ background-repeat: no-repeat;
+ background-position: top-center;}
+
+.caption {
+ color: black;
+ font-family: sans-serif;
+ font-size: 23pt;
+ font-style: italic;
+ font-weight: bolder;
+ margin-left: 3pt;
+}
+
+td.trans {background-image: url(bgtable.png);
+ background-repeat: no-repeat;}
+td.end {background-image: url(lines2.png);
+ background-repeat: x-repeat;}
+td.shadow1 {background-image: url(shadow1.png);
+ background-repeat: x-repeat;}
+
+table.vnice { font-family: sans-serif;
+ font-size: x-small;}
+
+a:link {background-color: transparent;
+ color: #191970;
+ text-decoration:none;}
+a:visited {background-color: transparent;
+ color: #551a8a;
+ text-decoration:none;}
+a:active {background-color: transparent;
+ color: #fe0000;
+ text-decoration:none;}
+a:hover {background-color: transparent;
+ color: #1919aa;
+ text-decoration:underline;}
+
+tr.menurow {background-color: #505050;
+ color: #000000;
+ vertical-align: middle;}
+
+td.deco {color: #ffffff;
+ background-color: #505050;
+ font-family: sans-serif;
+ font-size: small;}
+
+td.menuactive {color: #ffcc00;
+ background-color: #777777;
+ font-family: sans-serif;
+ font-size: small;}
+
+td.menu {color: #ffffff;
+ background-color: #505050;
+ font-family: sans-serif;
+ font-size: small;}
+
+a.menu {color: #eeeeee;
+ font-family: sans-serif;
+ font-size: small;}
+
+a.menu:hover {color: #ffffff;
+ text-decoration:none;}
+
diff --git a/doc/khelpcenter/lines.png b/doc/khelpcenter/lines.png
new file mode 100644
index 00000000..5fbba934
Binary files /dev/null and b/doc/khelpcenter/lines.png differ
diff --git a/doc/khelpcenter/lines2.png b/doc/khelpcenter/lines2.png
new file mode 100644
index 00000000..f2dd21c5
Binary files /dev/null and b/doc/khelpcenter/lines2.png differ
diff --git a/doc/khelpcenter/pointers.png b/doc/khelpcenter/pointers.png
new file mode 100644
index 00000000..987283a0
Binary files /dev/null and b/doc/khelpcenter/pointers.png differ
diff --git a/doc/khelpcenter/shadow1.png b/doc/khelpcenter/shadow1.png
new file mode 100644
index 00000000..661c0b9c
Binary files /dev/null and b/doc/khelpcenter/shadow1.png differ
diff --git a/doc/kioslave/CMakeLists.txt b/doc/kioslave/CMakeLists.txt
new file mode 100644
index 00000000..f4c618e5
--- /dev/null
+++ b/doc/kioslave/CMakeLists.txt
@@ -0,0 +1,19 @@
+add_subdirectory(bookmarks)
+add_subdirectory(bzip2)
+add_subdirectory(cgi)
+add_subdirectory(finger)
+add_subdirectory(fish)
+add_subdirectory(floppy)
+add_subdirectory(gzip)
+add_subdirectory(info)
+add_subdirectory(man)
+add_subdirectory(network)
+add_subdirectory(nfs)
+add_subdirectory(sftp)
+if(NOT WIN32)
+add_subdirectory(smb)
+endif(NOT WIN32)
+add_subdirectory(tar)
+add_subdirectory(thumbnail)
+add_subdirectory(xz)
+add_subdirectory(nepomuksearch)
diff --git a/doc/kioslave/bookmarks/CMakeLists.txt b/doc/kioslave/bookmarks/CMakeLists.txt
new file mode 100644
index 00000000..f030511b
--- /dev/null
+++ b/doc/kioslave/bookmarks/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/bookmarks)
+
diff --git a/doc/kioslave/bookmarks/index.docbook b/doc/kioslave/bookmarks/index.docbook
new file mode 100644
index 00000000..9923e6c0
--- /dev/null
+++ b/doc/kioslave/bookmarks/index.docbook
@@ -0,0 +1,29 @@
+
+
+
+]>
+
+
+bookmarks
+
+
+
+XavierVello
+xavier.vello@gmail.com
+
+
+
+
+2008-08-31
+0.2
+
+
+
+This KIO displays your bookmarks as a nice and functional &HTML; page. You access it typing bookmarks:/ in the &konqueror; location bar.
+
+The content and layout of the page is configurable. Just point &konqueror; to bookmarks:/config to launch the configuration dialog.
+
+
+
diff --git a/doc/kioslave/bzip2/CMakeLists.txt b/doc/kioslave/bzip2/CMakeLists.txt
new file mode 100644
index 00000000..114efda1
--- /dev/null
+++ b/doc/kioslave/bzip2/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/bzip2)
+
diff --git a/doc/kioslave/bzip2/index.docbook b/doc/kioslave/bzip2/index.docbook
new file mode 100644
index 00000000..d104ac6f
--- /dev/null
+++ b/doc/kioslave/bzip2/index.docbook
@@ -0,0 +1,40 @@
+
+
+
+]>
+
+
+bzip2 / bzip
+
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+
+
+
+bzip2 is a compression program.
+
+The bzip2 kioslave is not directly usable, and is intended for use
+as a filter. For example, the tar kioslave can filter a file through
+the bzip2 kioslave, in order to display the contents of a tar.bz2 file directly in a &konqueror;
+window.
+
+If you click on a file compressed with a .bz2 in &konqueror;, this kioslave is used to
+uncompress it and display it as a normal (uncompressed) file.
+
+If you are a developer, and would like to use the bzip2 filter,
+you can find documentation on using kioslaves at http://techbase.kde.org
+
+ See the manual: bzip2.
+
+
+bzip is the ancestor of bzip2. It is rarely
+used today, having been replaced with bzip2, which offers much better
+compression.
+
+
diff --git a/doc/kioslave/cgi/CMakeLists.txt b/doc/kioslave/cgi/CMakeLists.txt
new file mode 100644
index 00000000..132d95dd
--- /dev/null
+++ b/doc/kioslave/cgi/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/cgi)
+
diff --git a/doc/kioslave/cgi/index.docbook b/doc/kioslave/cgi/index.docbook
new file mode 100644
index 00000000..04e9721b
--- /dev/null
+++ b/doc/kioslave/cgi/index.docbook
@@ -0,0 +1,45 @@
+
+
+
+]>
+
+
+cgi
+
+
+&Lauri.Watts;&Lauri.Watts.mail;
+
+
+
+
+The CGI slave provides a way to execute
+CGI programs without the need to have a running web
+server. This can for example be used for local testing of
+CGI programs or for using search engines that only
+provide a CGI frontend like the one from
+Doxygen.
+
+The slave implements the cgi: protocol. It
+uses the filename from the given &URL; and searches a configurable
+list of folders.
+The list of folders can be retrieved using the command
+kde4-config
+. The value defaults to $HOME/.kde4/cgi-bin/.
+
+Use the &systemsettings; module CGI Script
+(launched with kcmshell4
+) to add or remove additional user defined paths that are searched for
+CGI scripts.
+
+If this kioslave finds an executable with the given name it
+executes it, passes the arguments of the &URL; and sets the
+environment variables needed by CGI
+programs.
+
+
+
diff --git a/doc/kioslave/finger/CMakeLists.txt b/doc/kioslave/finger/CMakeLists.txt
new file mode 100644
index 00000000..a3bc4b6e
--- /dev/null
+++ b/doc/kioslave/finger/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/finger)
+
diff --git a/doc/kioslave/finger/index.docbook b/doc/kioslave/finger/index.docbook
new file mode 100644
index 00000000..988450b2
--- /dev/null
+++ b/doc/kioslave/finger/index.docbook
@@ -0,0 +1,40 @@
+
+
+
+]>
+
+
+finger
+
+
+&Lauri.Watts;&Lauri.Watts.mail;
+
+
+
+
+Finger is a program to display information about users.
+
+If finger is enabled on the remote machine, you may be given
+information on the user's real name, if they are currently logged in, if
+they have mail and the text of their .plan file in
+their home folder.
+
+Finger is normally associated with a user@hostname address, which
+may or may not be the same as a users email address.
+
+Most Internet Service Providers no longer allow finger access, so,
+you may find that you get no useful answer for most people.
+
+Other people use their local .plan file to
+hold such information as PGP keys, the fact they are
+on vacation, and all sorts of information.
+
+Use the finger kioslave like this:
+finger://username@hostname
+
+ See the manual: finger.
+
+
+
diff --git a/doc/kioslave/fish/CMakeLists.txt b/doc/kioslave/fish/CMakeLists.txt
new file mode 100644
index 00000000..cdfbbe89
--- /dev/null
+++ b/doc/kioslave/fish/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/fish)
+
diff --git a/doc/kioslave/fish/index.docbook b/doc/kioslave/fish/index.docbook
new file mode 100644
index 00000000..f1af31db
--- /dev/null
+++ b/doc/kioslave/fish/index.docbook
@@ -0,0 +1,73 @@
+
+
+
+]>
+
+
+fish
+
+
+&Joerg.Walter; &Joerg.Walter.mail;
+&Brad.Hards; &Brad.Hards.mail;
+
+
+
+2010-10-27
+&kde; 4.5
+
+
+
+Allows you to access another computer's files using the Secure SHell (SSH) protocol. The remote computer needs to be running the SSH daemon, but the remainder of the protocol uses standard commandline tools as discussed below.
+
+You can use the fish kioslave like this:
+fish://hostname or fish://username@hostname.
+
+You need to use double forward slashes.
+
+You can omit the username (and the trailing
+@ symbol) if you have the same username on both computers.
+
+You can add a password in the format:
+fish://username:password@hostname
+but it is not necessary as you will be prompted for one if it is not
+supplied.
+
+If you are running the SSH daemon on a non-standard
+port, you can specify that port using the normal &URL; syntax as shown
+below:
+fish://hostname:portnumber.
+
+Fish should work with any roughly POSIX compatible
+&UNIX; based remote computer. It uses the shell commands
+cat, chgrp,
+chmod, chown,
+cp, dd,
+env, expr,
+grep, ls,
+mkdir, mv,
+rm, rmdir,
+sed,
+and wc. Fish starts
+/bin/sh as its shell and expects it to be a
+Bourne shell (or compatible, like bash).
+If the sed and
+file commands are available, as well as a
+/etc/apache/magic file with &MIME; type
+signatures, these will be used to guess &MIME; types.
+
+
+If Perl is available on the remote
+machine, it will be used instead. Then only env and
+/bin/sh are needed. Using
+Perl has the additional benefit of being
+faster.
+
+Fish may even work on &Windows; machines, if tools like
+Cygwin are installed. All the above
+utilities must be in the system PATH, and the initial
+shell must be able to process the command echo
+FISH:;/bin/sh correctly.
+
+
diff --git a/doc/kioslave/floppy/CMakeLists.txt b/doc/kioslave/floppy/CMakeLists.txt
new file mode 100644
index 00000000..6eaae266
--- /dev/null
+++ b/doc/kioslave/floppy/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/floppy)
+
diff --git a/doc/kioslave/floppy/index.docbook b/doc/kioslave/floppy/index.docbook
new file mode 100644
index 00000000..f90d4416
--- /dev/null
+++ b/doc/kioslave/floppy/index.docbook
@@ -0,0 +1,58 @@
+
+
+
+]>
+
+
+Floppy
+
+
+&Alexander.Neundorf; &Alexander.Neundorf.mail;
+
+
+
+
+
+The floppy ioslave gives you easy access to the floppy disk drives
+installed on your system.
+
+
+
+The drive letter becomes the first subdirectory
+in the floppy &URL;. Let's say there is a file logo.png on your floppy
+disk in drive A, then the &URL; will be floppy:/a/logo.png
+
+
+
+If you want to access drive B, floppy:/b will do it.
+floppy:/ is a shortcut for floppy:/a.
+
+
+Note that floppy:/logo.png means you have a disk drive
+named logo.png.
+
+
+To use it you need to have the mtools package
+installed, and the floppy ioslave supports everything the various mtools
+command line utilities support. You don't have to mount your floppy disks,
+simply enter floppy:/ in any &kde; 3.x app and you will be able to
+read from and write to your floppy drive.
+
+
+It also works with USB sticks, ZIP and JAZ drives.
+You can use floppy:/u for the USB stick and floppy:/z for the zip drive, for example.
+To make this work, you might need to adjust your /etc/mtools file. See the manpage
+for documentation.
+
+
+The ioslave gives read and write access to the floppy drive, but not
+simultaneously. While you can read and write to the floppy during the same
+session, reading and writing have to happen one after the other, not at the same
+time.
+
+Author: Alexander Neundorf neundorf@kde.org
+
+
+
diff --git a/doc/kioslave/gzip/CMakeLists.txt b/doc/kioslave/gzip/CMakeLists.txt
new file mode 100644
index 00000000..7a2b465f
--- /dev/null
+++ b/doc/kioslave/gzip/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/gzip)
+
diff --git a/doc/kioslave/gzip/index.docbook b/doc/kioslave/gzip/index.docbook
new file mode 100644
index 00000000..d8752a5c
--- /dev/null
+++ b/doc/kioslave/gzip/index.docbook
@@ -0,0 +1,37 @@
+
+
+
+]>
+
+
+gzip
+
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+
+
+
+gzip is a compression program
+
+The gzip kioslave is not directly usable, and is intended for use
+as a filter. For example, the tar kioslave can filter a file through
+the gzip kioslave, in order to display the contents of a tar.gz file directly in a &konqueror;
+window.
+
+If you click on a file compressed with a gz extension in &konqueror;, this kioslave is
+used to uncompress it and display it as a normal (uncompressed)
+file.
+
+If you are a developer, and would like to use the gzip filter, you
+can find documentation on using kioslaves at http://techbase.kde.org
+
+ See the manual: gzip.
+
+
+
diff --git a/doc/kioslave/info/CMakeLists.txt b/doc/kioslave/info/CMakeLists.txt
new file mode 100644
index 00000000..76351eff
--- /dev/null
+++ b/doc/kioslave/info/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/info)
+
diff --git a/doc/kioslave/info/index.docbook b/doc/kioslave/info/index.docbook
new file mode 100644
index 00000000..2724c7dd
--- /dev/null
+++ b/doc/kioslave/info/index.docbook
@@ -0,0 +1,43 @@
+
+
+
+]>
+
+
+Info
+
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+ Nicolas
+ Goutte
+ goutte@kde.org
+
+
+
+
+
+Info is a type of documentation. The documents are in a file
+format called texinfo, and can be read on the command line with the
+info program.
+
+The Info ioslave allows you to read the info pages installed on
+your system, from within &konqueror;. You can use it very easily:
+
+info:gcc
+
+This would show you the top level node of the Info documentation
+for the &gcc; compiler.
+
+Info is a &GNU; replacement for
+man, but is not widely used outside of
+&GNU; software.
+
+You can quite easily browse the info documentation you have
+installed from within the &khelpcenter; application, or you can use the
+info ioslave directly from within both &konqueror; and the
+mini-cli.
+
+
diff --git a/doc/kioslave/man/CMakeLists.txt b/doc/kioslave/man/CMakeLists.txt
new file mode 100644
index 00000000..4d61de76
--- /dev/null
+++ b/doc/kioslave/man/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/man)
+
diff --git a/doc/kioslave/man/index.docbook b/doc/kioslave/man/index.docbook
new file mode 100644
index 00000000..d337f2cb
--- /dev/null
+++ b/doc/kioslave/man/index.docbook
@@ -0,0 +1,93 @@
+
+
+
+]>
+
+
+Man
+
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+ Nicolas
+ Goutte
+ goutte@kde.org
+
+
+
+
+
+
+Using the man ioslave you are able to read the man pages installed
+on your system. It is easy to use:
+
+
+
+
+man:
+
+See the sections of the manual, click to find the rest.
+
+
+
+
+man:/fopen
+
+See the man page of fopen.
+
+
+
+
+man:/fopen(3)
+
+See the man page of fopen in section 3.
+
+
+
+
+man:/(3)
+
+See the index of section 3.
+
+
+
+
+man:/intro(3)
+
+See the introduction of section 3.
+
+
+
+
+
+If there are more than one man page of the name that you
+have entered, you will get a list where you can choose the man page
+that you want to see.
+
+
+There is also a shortcut: #fopen,
+which has the same effect as above.
+
+
+
+If you do not find all your man pages, adjust the configuration file
+/etc/manpath.config
+(or a file of a similar name depending on your distribution)
+or adjust the environment variables
+MANPATH and MANSECT.
+
+
+
+As with any other &kde; ioslave, it is possible to enter a &URL;, like
+man:/socket in any
+&kde; application. Try it in &kwrite; and you will see the man page in
+&HTML; format.
+
+
+
+Contact mailing list: kde-devel@kde.org
+
+
+
diff --git a/doc/kioslave/nepomuksearch/CMakeLists.txt b/doc/kioslave/nepomuksearch/CMakeLists.txt
new file mode 100644
index 00000000..1154b0f2
--- /dev/null
+++ b/doc/kioslave/nepomuksearch/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/nepomuksearch)
+
diff --git a/doc/kioslave/nepomuksearch/index.docbook b/doc/kioslave/nepomuksearch/index.docbook
new file mode 100644
index 00000000..4843ebf6
--- /dev/null
+++ b/doc/kioslave/nepomuksearch/index.docbook
@@ -0,0 +1,110 @@
+
+
+
+
+]>
+
+
+ nepomuksearch
+
+
+
+
+ Sebastian
+ Trüg
+
+ trueg@kde.org
+
+
+
+
+ 2010-09-10
+ 1.0.0
+
+
+
+ Overview
+
+ The nepomuksearch protocol allows to search the Nepomuk meta data store for files or any other type of resource (although files is the most important use case since we are talking about virtual file systems here).
+
+ For it to work the Nepomuk system needs to be activated. Activating the Strigi file indexer provides better results and way more search possibilities.
+
+
+ Typically nepomuksearch is used transparently to the user through an application like Dolphin which provide GUI elements to construct the necessary query and the corresponding URL. However, it is also possible to write a query URL manually. There are two different possibilities which might be of interest to the user (be aware that queries created as presented below are not restricted to files):
+
+
+
+ nepomuksearch:/?query=Nepomuk
+
+
+ will look for anything containing the word "Nepomuk". "Nepomuk" can be replaced with anything the simple allows.
+
+
+
+
+ nepomuksearch:/?sparql=select ?r where { ?r nao:hasTag ?tag . ?tag nao:prefLabel 'Nepomuk'^^xsd:string . }
+
+
+ will execute the SPARQL query which in this case looks for all resources that are tagged with a tag that has the label "Nepomuk". Be aware that the query needs to be percent-encoded, &ie; a URI like <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#Tag> would have to be written as %3chttp:%2f%2fwww.semanticdesktop.org%2fontologies%2f2007%2f08%2f15%2fnao#Tag%3e.
+
+
+
+
+
+
+
+ Nepomuk Query Syntax
+ The syntax is fairly simple. Multiple query terms can be combined with the keywords AND or OR, terms can be excluded by prefixing them with a minus, and specific properties can be searched by combining the property name with a comparator and the value.
+
+ This syntax can also be used in standard search fields such as the Dolphin one.
+
+
+ Examples
+
+
+
+ Nepomuk KDE or Nepomuk AND KDE
+
+
+ search for everything containing the words "Nepomuk" and "KDE" in any of their properties (this includes the content of files).
+
+
+
+
+ Nepomuk OR KDE
+
+
+ search for everything containing either the word "Nepomuk" or the word "KDE" in any of their properties.
+
+
+
+
+ "Nepomuk KDE"
+
+
+ search for everything containing the exact phrase "Nepomuk KDE" in any of their properties.
+
+
+
+
+ hastag:Nepomuk
+
+
+ search for everything that is tagged with a tag named "Nepomuk".
+
+
+
+
+ +hastag:nepomuk AND -hastag:scribo
+
+
+ search for everything that has a tag labeled "nepomuk" but not a tag labeled "scribo".
+
+
+
+
+
+
+
diff --git a/doc/kioslave/network/CMakeLists.txt b/doc/kioslave/network/CMakeLists.txt
new file mode 100644
index 00000000..707228e9
--- /dev/null
+++ b/doc/kioslave/network/CMakeLists.txt
@@ -0,0 +1 @@
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/network)
diff --git a/doc/kioslave/network/index.docbook b/doc/kioslave/network/index.docbook
new file mode 100644
index 00000000..560d4c1d
--- /dev/null
+++ b/doc/kioslave/network/index.docbook
@@ -0,0 +1,61 @@
+
+
+
+]>
+
+
+
+network
+
+
+
+
+ Friedrich W. H.Kossebau
+ kossebau@kde.org
+
+
+
+
+ 2009-04-28
+ 0.1
+
+
+
+
+
+ The network ioslave enables the user to browse the devices connected to the local network
+ and the services running on them. It it also possible to start programs for services
+ whose type is known.
+
+
+
+ To see all the devices found, enter
+ network:/.
+
+
+
+ network:/hostname_of_device
+ will list the services found to be running on a device.
+
+
+
+ Selecting a service will forward to a url which matches the service, given there is a suitable, e.g.
+ ssh:/hostname_of_device:port/ for a SSH service.
+ Each known service type has a mimetype assigned to it, so a user can assign new handlers
+ for the resulting urls. This is done with the control module
+ File Associations in &systemsettings;.
+ The mimetypes of the services are currently all named inode/vnd.kde.service.*.
+
+
+
+
+ The network kioslave currently only finds and displays devices and services which are
+ actively advertising themselves using the service discovery framework
+ DNS-SD.
+
+
+
+
+
diff --git a/doc/kioslave/nfs/CMakeLists.txt b/doc/kioslave/nfs/CMakeLists.txt
new file mode 100644
index 00000000..668a6040
--- /dev/null
+++ b/doc/kioslave/nfs/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/nfs)
+
diff --git a/doc/kioslave/nfs/index.docbook b/doc/kioslave/nfs/index.docbook
new file mode 100644
index 00000000..f0c8799b
--- /dev/null
+++ b/doc/kioslave/nfs/index.docbook
@@ -0,0 +1,46 @@
+
+
+
+]>
+
+
+nfs
+
+
+&Lauri.Watts; &Lauri.Watts.mail;
+
+
+
+
+Sun's NFS protocol provides transparent remote access to
+shared file systems across networks. The NFS protocol is
+designed to be machine, operating system, network architecture, and
+transport protocol independent. This independence is achieved through the
+use of Remote Procedure Call (RPC) primitives built on
+top of an eXternal Data Representation (XDR).
+
+
+
+The supporting MOUNT protocol performs the operating system-specific
+functions that allow clients to attach remote folder trees to a point
+within the local file system. The mount process also allows the server to
+grant remote access privileges to a restricted set of clients via export
+control.
+
+
+The Lock Manager provides support for file locking when used in the
+NFS environment. The Network Lock Manager
+(NLM) protocol isolates the inherently stateful aspects
+of file locking into a separate protocol.
+
+
+Source:
+
+http://www.networksorcery.com/enp/protocol/nfs.htm
+
+
+ See the manual: nfs.
+
+
diff --git a/doc/kioslave/sftp/CMakeLists.txt b/doc/kioslave/sftp/CMakeLists.txt
new file mode 100644
index 00000000..9e83b7eb
--- /dev/null
+++ b/doc/kioslave/sftp/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/sftp)
+
diff --git a/doc/kioslave/sftp/index.docbook b/doc/kioslave/sftp/index.docbook
new file mode 100644
index 00000000..ba14a682
--- /dev/null
+++ b/doc/kioslave/sftp/index.docbook
@@ -0,0 +1,26 @@
+
+
+
+]>
+
+
+sftp
+
+
+&Ferdinand.Gassauer; &Ferdinand.Gassauer.mail;
+
+
+
+SFTP is a Secure file transfer protocol.
+sftp is an interactive file transfer program,
+similar to ftp, but it performs all operations over an encrypted
+ssh transport. It may use many of the features of
+ssh, including public key authentication and
+compression.
+
+ See the manual: sftp.
+
+
+
diff --git a/doc/kioslave/smb/CMakeLists.txt b/doc/kioslave/smb/CMakeLists.txt
new file mode 100644
index 00000000..06084267
--- /dev/null
+++ b/doc/kioslave/smb/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/smb)
+
diff --git a/doc/kioslave/smb/index.docbook b/doc/kioslave/smb/index.docbook
new file mode 100644
index 00000000..e676e8ae
--- /dev/null
+++ b/doc/kioslave/smb/index.docbook
@@ -0,0 +1,64 @@
+
+
+
+]>
+
+
+SMB
+
+
+&Alexander.Neundorf; &Alexander.Neundorf.mail;
+
+
+
+
+The smb ioslave enables you to browse the shares of a &Windows; (or Samba)
+network.
+
+
+
+To see the workgroups, enter
+smb:/.
+
+
+smb://a_workgroup
+will list the hosts in this workgroup.
+
+
+To see the shares of a host, enter
+smb://the_host
+or
+smb:/a_workgroup/the_host.
+
+
+To access a share directly enter
+smb://the_host/the_share
+or
+smb:/a_workgroup/the_host/the_share
+
+
+
+The smb ioslave requires that you have libsmbclient to use this ioslave.
+
+
+
+You can set your default user name and password in the &systemsettings;
+category Network and Connectivity in
+Sharing
+Windows Shares. This is especially useful if you are a
+member of a &Windows; NT domain. There you can also set your
+workgroup name, but in most cases this is not required. The kioslave will ask for your username and password if a default is not set.
+
+
+
+This ioslave is tested and developed using mainly Samba 2.0.7, but other
+versions of Samba should work too.
+
+
+
+Author: Alexander Neundorf neundorf@kde.org
+
+
+
diff --git a/doc/kioslave/tar/CMakeLists.txt b/doc/kioslave/tar/CMakeLists.txt
new file mode 100644
index 00000000..9577b046
--- /dev/null
+++ b/doc/kioslave/tar/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/tar)
+
diff --git a/doc/kioslave/tar/index.docbook b/doc/kioslave/tar/index.docbook
new file mode 100644
index 00000000..d15770ac
--- /dev/null
+++ b/doc/kioslave/tar/index.docbook
@@ -0,0 +1,25 @@
+
+
+
+]>
+
+
+tar
+
+
+&Ferdinand.Gassauer; &Ferdinand.Gassauer.mail;
+
+
+
+
+An archiving program designed to store and extract files from an archive
+file known as a tarfile. A tarfile may be made on a tape drive, however, it
+is also common to write a tarfile to a normal file.
+
+
+ See the manual: tar.
+
+
+
diff --git a/doc/kioslave/thumbnail/CMakeLists.txt b/doc/kioslave/thumbnail/CMakeLists.txt
new file mode 100644
index 00000000..987324e7
--- /dev/null
+++ b/doc/kioslave/thumbnail/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/thumbnail)
+
diff --git a/doc/kioslave/thumbnail/index.docbook b/doc/kioslave/thumbnail/index.docbook
new file mode 100644
index 00000000..5cbd9a2b
--- /dev/null
+++ b/doc/kioslave/thumbnail/index.docbook
@@ -0,0 +1,35 @@
+
+
+
+]>
+
+
+thumbnail
+
+
+&Carsten.Pfeiffer; &Carsten.Pfeiffer.mail;
+
+
+
+The thumbnail kioslave is used by &kde; for network transparent
+and persistent generation of thumbnails.
+
+The thumbnail kioslave uses plugins to generate the actual
+thumbnails. You can enable viewing of these thumbnails from the
+View
+Preview submenu, available in
+&konqueror; in file manager mode.
+
+The thumbnail kioslave is not directly useful to a user, but if
+you are a developer, you can use it within your own applications to
+create file previews.
+
+See the documentation in the sources for more information. You
+will find these at
+$KDEDIR/include/kio/thumbcreator.h or
+in the source folder kdebase/runtime/kioslave/thumbnail
+
+
diff --git a/doc/kioslave/xz/CMakeLists.txt b/doc/kioslave/xz/CMakeLists.txt
new file mode 100644
index 00000000..6d422ad5
--- /dev/null
+++ b/doc/kioslave/xz/CMakeLists.txt
@@ -0,0 +1,3 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kioslave/xz)
+
diff --git a/doc/kioslave/xz/index.docbook b/doc/kioslave/xz/index.docbook
new file mode 100644
index 00000000..b8c5fecf
--- /dev/null
+++ b/doc/kioslave/xz/index.docbook
@@ -0,0 +1,37 @@
+
+
+
+]>
+
+
+xz / lzma
+
+
+Per Øyvind Karlsen
+
+
+
+
+Xz is a compression program
+
+The xz kioslave is not directly usable, and is intended for use
+as a filter. For example, the tar kioslave can filter a file through
+the xz kioslave, in order to display the contents of a tar.lzma or tar.xz
+file directly in a &konqueror; window.
+
+If you click on a file compressed with a .lzma or tar.xz
+in &konqueror;, this kioslave is used to
+uncompress it and display it as a normal (uncompressed) file.
+
+If you are a developer, and would like to use the xz filter,
+you can find documentation on using kioslaves at http://techbase.kde.org
+
+See the manual: xz.
+
+
+
diff --git a/doc/knetattach/CMakeLists.txt b/doc/knetattach/CMakeLists.txt
new file mode 100644
index 00000000..ac64649a
--- /dev/null
+++ b/doc/knetattach/CMakeLists.txt
@@ -0,0 +1,2 @@
+########### install files ###############
+kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en)
diff --git a/doc/knetattach/index.docbook b/doc/knetattach/index.docbook
new file mode 100644
index 00000000..ccbb55e7
--- /dev/null
+++ b/doc/knetattach/index.docbook
@@ -0,0 +1,378 @@
+
+
+
+
+
+
+
+
+]>
+
+
+
+
+
+
+The &knetattach; Handbook
+
+
+
+&Orville.Bennett; &Orville.Bennett.mail;
+
+
+
+
+
+
+2005
+&Orville.Bennett;
+
+&FDLNotice;
+
+2010-01-18
+&kde; 4.4
+
+
+
+&knetattach; is a wizard which makes it easier to integrate your
+network resources with your &kde; Desktop.
+
+
+
+
+
+
+KDE
+kdebase
+knetattach
+Network Folders
+Network Folder Wizard
+KDE Network Folder Wizard
+
+
+
+
+
+
+
+Introduction
+
+
+The &knetattach; wizard, affectionately and hereafter known as the
+Network Folder Wizard, allows easy addition and integration of various
+network folders with your &kde; desktop. Please report any problems or
+feature requests for it to the &kde; bugs website.
+
+
+
+
+Using &knetattach;
+
+
+As you will see in the screenshot below, the Network Folder Wizard currently
+allows you to add four types of network folders: WebDav, &FTP;,
+&Microsoft; &Windows; (Samba) network drives and SSH.
+Additionally you can select a recent connection for the list box.
+
+
+Here's a screenshot of &knetattach;
+
+
+
+
+
+Screenshot
+
+
+Network Folder Wizard main window
+
+
+
+
+
+
+
+Adding network folders
+
+
+Network folders show up in a special location of &konqueror; and &dolphin;
+called a virtual folder.
+This virtual folder is accessed by typing remote:/ in
+the location bar or by selecting Network from the
+Places panel. You will then be able to see
+any folders which have been previously added and you also will be able to use
+the wizard to add new ones.
+
+Here's a screenshot of &knetattach;
+
+
+
+
+
+Screenshot
+
+
+The virtual folder with the Network Folder wizard
+
").arg(QLatin1String(PAGE_HELP_BEGIN_ID),
+ i18nc("@title","Information about bug reporting")) +
+ QString("
%1
%2
%3
").arg(
+ i18nc("@info/rich", "You can help us improve this software by filing a bug report."),
+ i18nc("@info/rich","It is safe to close this dialog. If you do not "
+ "want to, you do not have to file a bug report."),
+ i18nc("@info/rich","In order to generate a useful bug report we need some "
+ "information about both the crash and your system. (You may also "
+ "need to install some debug packages.)")) +
+
+ //Sub-introduction
+ QString("
").arg(
+ i18nc("@info/rich","This assistant will guide you through the crash "
+ "reporting process for the KDE bug tracking system. All the "
+ "information you enter on the bug report must be written "
+ "in English, if possible, as KDE is formed internationally.")) +
+
+ //Bug Awareness Page
+ QString("
%2
").arg(QLatin1String(PAGE_AWARENESS_ID),
+ i18nc("@title","What do you know about the crash?")) +
+ QString("
%1
%2
%3
%4
%5
%6
%7
%8
"
+ "
%9
").arg(
+ i18nc("@info/rich","In this page you need to describe how much do you know about "
+ "the desktop and the application state before it crashed."),
+ i18nc("@info/rich","If you can, describe in as much detail as possible the crash "
+ "circumstances, and what you were doing when the application crashed "
+ "(this information is going to be requested later.) You can mention: "),
+ i18nc("@info/rich crash situation example","actions you were taking inside or outside "
+ "the application"),
+ i18nc("@info/rich crash situation example","documents or images that you were using "
+ "and their type/format (later if you go to look at the report in the "
+ "bug tracking system, you can attach a file to the report)"),
+ i18nc("@info/rich crash situation example","widgets that you were running"),
+ i18nc("@info/rich crash situation example","the URL of a web site you were browsing"),
+ i18nc("@info/rich crash situation example","configuration details of the application"),
+ i18nc("@info/rich crash situation example","or other strange things you notice before "
+ "or after the crash. "),
+ i18nc("@info/rich","Screenshots can be very helpful sometimes. You can attach them to "
+ "the bug report after it is posted to the bug tracking system.")) +
+
+ //Crash Information Page
+ QString("
%2
").arg(QLatin1String(PAGE_CRASHINFORMATION_ID),
+ i18nc("@title","Crash Information (backtrace)")) +
+ QString("
%1
%2
%3
%4
").arg(
+ i18nc("@info/rich","This page will generate a \"backtrace\" of the crash. This "
+ "is information that tells the developers where the application "
+ "crashed."),
+ i18nc("@info/rich", "If the crash information is not detailed enough, you may "
+ "need to install some debug packages and reload it (if the "
+ "Install Debug Symbols button is available you "
+ "can use it to automatically install the missing information.)"),
+ i18nc("@info/rich", "You can find more information about backtraces, what they mean, "
+ "and how they are useful at %1",QString(TECHBASE_HOWTO_DOC) ),
+ i18nc("@info/rich","Once you get a useful backtrace (or if you do not want to "
+ "install the missing debugging packages) you can continue.")) +
+
+ //Conclusions Page
+ QString("
").arg(
+ i18nc("@info/rich","Using the quality of the crash information gathered, "
+ "and your answers on the previous page, the assistant will "
+ "tell you if the crash is worth reporting or not."),
+ i18nc("@info/rich","If the crash is worth reporting but the application "
+ "is not supported in the KDE bug tracking system, you "
+ "will need to directly contact the maintainer of the application."),
+ i18nc("@info/rich","If the crash is listed as being not worth reporting, "
+ "and you think the assistant has made a mistake, "
+ "you can still manually report the bug by logging into the "
+ "bug tracking system. You can also go back and change information "
+ "and download debug packages.")) +
+
+ //Bugzilla Login Page
+ QString("
%2
").arg(QLatin1String(PAGE_BZLOGIN_ID),
+ i18nc("@title","Login into the bug tracking system")) +
+ QString("
%1
%2
%3
").arg(
+ i18nc("@info/rich","We may need to contact you in the future to ask for "
+ "further information. As we need to keep track of the bug reports, "
+ "you "
+ "need to have an account on the KDE bug tracking system. If you do "
+ "not have one, you can create one here: %1",
+ QString(KDE_BUGZILLA_CREATE_ACCOUNT_URL)),
+ i18nc("@info/rich","Then, enter your username and password and "
+ "press the Login button. You can use this login to directly access the "
+ "KDE bug tracking system later."),
+ i18nc("@info/rich","The KWallet dialog may appear when pressing Login to "
+ "save your password in the KWallet password system. Also, it will "
+ "prompt you for the KWallet password upon loading to autocomplete "
+ "the login fields if you use this assistant again.")) +
+
+ //Bugzilla Duplicates Page
+ QString("
%2
").arg(QLatin1String(PAGE_BZDUPLICATES_ID),
+ i18nc("@title","List of possible duplicate reports")) +
+ QString("
%1
%2
%3
%4
%5
").arg(
+ //needs some more string cleanup below
+ i18nc("@info/rich","This page will search the bug report system for "
+ "similar crashes which are possible duplicates of your bug. If "
+ "there are similar bug reports found, you can double click on them "
+ "to see details. Then, read the current bug report information so "
+ "you can check to see if they are similar. "),
+ i18nc("@info/rich","If you are very sure your bug is the same as another that is "
+ "previously reported, you can set your information to be attached to "
+ "the existing report."),
+ i18nc("@info/rich","If you are unsure whether your report is the same, follow the main "
+ "options to tentatively mark your crash as a duplicate of that "
+ "report. This is usually the safest thing to do. We cannot "
+ "uncombine bug reports, but we can easily merge them."),
+ i18nc("@info/rich","If not enough possible duplicates are found, or you "
+ "did not find a similar report, then you can force it to search "
+ "for more bug reports (only if the date range limit is not reached.)"),
+ i18nc("@info/rich","If you do not find any related reports, your crash information "
+ "is not useful enough, and you really cannot give additional "
+ "information about the crash context, then it is better to "
+ "not file the bug report, thereby closing the assistant.")) +
+
+ //Bugzilla Crash Information - Details Page
+ QString("
%2
").arg(QLatin1String(PAGE_BZDETAILS_ID),
+ i18nc("@title","Details of the bug report and your system")) +
+ QString("
").arg(
+ i18nc("@info/rich","In this case you need to write a title and description "
+ "of the crash. Explain as best you can. "),
+ QLatin1String(PAGE_AWARENESS_ID),
+ i18nc("@title","What do you know about the crash?"),
+ i18nc("@info/rich", "You can also specify your distribution method (GNU/Linux "
+ "distribution or packaging system) or if you compiled the KDE "
+ "Platform from sources."),
+ i18nc("@info/rich", "You should write those information in English.")) +
+
+ //Bugzilla Send Page
+ QString("
%2
").arg(QLatin1String(PAGE_BZSEND_ID),
+ i18nc("@title","Sending the Crash Report")) +
+ QString("
%1
%2
").arg(
+ i18nc("@info/rich","The last page will send the bug report to the bug tracking "
+ "system and will notify you when it is done. It will then show "
+ "the web address of the bug report in the KDE bug tracking system, "
+ "so that you can look at the report later."),
+ i18nc("@info/rich","If the process fails, you can click "
+ "Retry to try sending the bug report again. "
+ "If the report cannot be sent because the bug tracking system has a "
+ "problem, you can save it to a file to manually report later.")) +
+
+ QString("
%1
%2
").arg(
+ i18nc("@info/rich", "Thank you for being part of KDE!"),
+ i18nc("@info/rich", "If you are interested in helping us to keep the KDE bug tracker system "
+ "clean and useful, which allows the developers to be more focused on "
+ "fixing the real issues, you are welcome to "
+ "join the BugSquad team."));
+
+ m_textBrowser->setText(text);
+
+ setMainWidget(m_textBrowser);
+
+ KConfigGroup config(KGlobal::config(), "AboutBugReportingDialog");
+ restoreDialogSize(config);
+}
+
+AboutBugReportingDialog::~AboutBugReportingDialog( )
+{
+ KConfigGroup config(KGlobal::config(), "AboutBugReportingDialog");
+ saveDialogSize(config);
+}
+
+void AboutBugReportingDialog::handleInternalLinks(const QString& url)
+{
+ if (!url.isEmpty()) {
+ if (url.startsWith('#')) {
+ showSection(url.mid(1,url.length()));
+ } else {
+ KToolInvocation::invokeBrowser(url);
+ }
+ }
+}
+
+void AboutBugReportingDialog::showSection(const QString& anchor)
+{
+ m_textBrowser->scrollToAnchor(anchor);
+}
+
diff --git a/drkonqi/aboutbugreportingdialog.h b/drkonqi/aboutbugreportingdialog.h
new file mode 100644
index 00000000..99a40988
--- /dev/null
+++ b/drkonqi/aboutbugreportingdialog.h
@@ -0,0 +1,43 @@
+/*******************************************************************
+* aboutbugreportingdialog.h
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#ifndef ABOUTBUGREPORTINGDIALOG__H
+#define ABOUTBUGREPORTINGDIALOG__H
+
+#include
+
+class KTextBrowser;
+
+class AboutBugReportingDialog: public KDialog
+{
+ Q_OBJECT
+
+public:
+ explicit AboutBugReportingDialog(QWidget * parent = 0);
+ ~AboutBugReportingDialog();
+ void showSection(const QString&);
+
+private Q_SLOTS:
+ void handleInternalLinks(const QString&);
+
+private:
+ KTextBrowser * m_textBrowser;
+};
+
+#endif
diff --git a/drkonqi/applicationdetailsexamples.cpp b/drkonqi/applicationdetailsexamples.cpp
new file mode 100644
index 00000000..65ceb18c
--- /dev/null
+++ b/drkonqi/applicationdetailsexamples.cpp
@@ -0,0 +1,76 @@
+/*******************************************************************
+* applicationdetailsexamples.cpp
+* Copyright 2010 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#include "applicationdetailsexamples.h"
+
+#include
+
+#include "drkonqi.h"
+#include "crashedapplication.h"
+
+ApplicationDetailsExamples::ApplicationDetailsExamples(QObject * parent)
+ : QObject(parent)
+{
+ QString binaryName = DrKonqi::crashedApplication()->fakeExecutableBaseName();
+
+ if (binaryName == QLatin1String("plasma-desktop")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "Widgets you have in your desktop and panels (both official and unofficial), "
+ "desktop settings (wallpaper plugin, themes), activities, and dashboard configuration.");
+ } else if (binaryName == QLatin1String("kwin")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "State of Desktop Effects (Compositing), kind of effects enabled, window decoration, "
+ "and specific window rules and configuration.");
+ } else if (binaryName == QLatin1String("konqueror") ||
+ binaryName == QLatin1String("rekonq")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "sites you were visiting, number of opened tabs, plugins you have installed, "
+ "and any other non-default setting.");
+ } else if (binaryName == QLatin1String("dolphin")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "File view mode, grouping and sorting settings, preview settings, and directory you were browsing.");
+ } else if (binaryName == QLatin1String("kopete")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "Instant Messaging protocols you use, and plugins you have installed (official and unofficial).");
+ } else if (binaryName == QLatin1String("kmail")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "Mail protocols and account-types you use.");
+ } else if (binaryName == QLatin1String("kwrite") ||
+ binaryName == QLatin1String("kate") ||
+ binaryName == QLatin1String("kword")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "Type of the document you were editing.");
+ } else if (binaryName == QLatin1String("juk") ||
+ binaryName == QLatin1String("amarok") ||
+ binaryName == QLatin1String("dragon") ||
+ binaryName == QLatin1String("kaffeine")) {
+ m_examples = i18nc("@info examples about information the user can provide",
+ "Type of media (extension and format) you were watching and/or listening to.");
+ }
+}
+
+bool ApplicationDetailsExamples::hasExamples() const
+{
+ return !m_examples.isEmpty();
+}
+
+QString ApplicationDetailsExamples::examples() const
+{
+ return m_examples;
+}
diff --git a/drkonqi/applicationdetailsexamples.h b/drkonqi/applicationdetailsexamples.h
new file mode 100644
index 00000000..3efb8b36
--- /dev/null
+++ b/drkonqi/applicationdetailsexamples.h
@@ -0,0 +1,38 @@
+/*******************************************************************
+* applicationdetailsexamples.h
+* Copyright 2010 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#ifndef APPLICATIONDETAILSEXAMPLES__H
+#define APPLICATIONDETAILSEXAMPLES__H
+
+#include
+#include
+
+class ApplicationDetailsExamples : QObject
+{
+Q_OBJECT
+public:
+ explicit ApplicationDetailsExamples(QObject * parent);
+ bool hasExamples() const;
+ QString examples() const;
+
+private:
+ QString m_examples;
+};
+
+#endif
diff --git a/drkonqi/backtracegenerator.cpp b/drkonqi/backtracegenerator.cpp
new file mode 100644
index 00000000..1107e117
--- /dev/null
+++ b/drkonqi/backtracegenerator.cpp
@@ -0,0 +1,165 @@
+/*****************************************************************
+ * drkonqi - The KDE Crash Handler
+ *
+ * Copyright (C) 2000-2003 Hans Petter Bieker
+ * Copyright (C) 2009 George Kiagiadakis
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *****************************************************************/
+#include "backtracegenerator.h"
+
+#include
+#include
+#include
+
+#include "parser/backtraceparser.h"
+
+BacktraceGenerator::BacktraceGenerator(const Debugger & debugger, QObject *parent)
+ : QObject(parent),
+ m_debugger(debugger), m_proc(NULL),
+ m_temp(NULL), m_state(NotLoaded)
+{
+ m_parser = BacktraceParser::newParser(m_debugger.codeName(), this);
+ m_parser->connectToGenerator(this);
+
+#ifdef BACKTRACE_PARSER_DEBUG
+ m_debugParser = BacktraceParser::newParser(QString(), this); //uses the null parser
+ m_debugParser->connectToGenerator(this);
+#endif
+}
+
+BacktraceGenerator::~BacktraceGenerator()
+{
+ if (m_proc && m_proc->state() == QProcess::Running) {
+ kWarning() << "Killing running debugger instance";
+ m_proc->disconnect(this);
+ m_proc->terminate();
+ if (!m_proc->waitForFinished(10000)) {
+ m_proc->kill();
+ m_proc->waitForFinished();
+ }
+ delete m_proc;
+ delete m_temp;
+ }
+}
+
+bool BacktraceGenerator::start()
+{
+ //they should always be null before entering this function.
+ Q_ASSERT(m_proc == NULL && m_temp == NULL);
+
+ m_parsedBacktrace.clear();
+ m_state = Loading;
+
+ emit starting();
+
+ if (!m_debugger.isValid() || !m_debugger.isInstalled()) {
+ m_state = FailedToStart;
+ emit failedToStart();
+ return false;
+ }
+
+ m_proc = new KProcess;
+ m_proc->setEnv("LC_ALL", "C"); // force C locale
+
+ m_temp = new KTemporaryFile;
+ m_temp->open();
+ m_temp->write(m_debugger.backtraceBatchCommands().toLatin1());
+ m_temp->write("\n", 1);
+ m_temp->flush();
+
+ // start the debugger
+ QString str = m_debugger.command();
+ Debugger::expandString(str, Debugger::ExpansionUsageShell, m_temp->fileName());
+
+ *m_proc << KShell::splitArgs(str);
+ m_proc->setOutputChannelMode(KProcess::OnlyStdoutChannel);
+ m_proc->setNextOpenMode(QIODevice::ReadWrite | QIODevice::Text);
+ connect(m_proc, SIGNAL(readyReadStandardOutput()),
+ SLOT(slotReadInput()));
+ connect(m_proc, SIGNAL(finished(int,QProcess::ExitStatus)),
+ SLOT(slotProcessExited(int,QProcess::ExitStatus)));
+
+ m_proc->start();
+ if (!m_proc->waitForStarted()) {
+ //we mustn't keep these around...
+ m_proc->deleteLater();
+ m_temp->deleteLater();
+ m_proc = NULL;
+ m_temp = NULL;
+
+ m_state = FailedToStart;
+ emit failedToStart();
+ return false;
+ }
+
+ return true;
+}
+
+void BacktraceGenerator::slotReadInput()
+{
+ // we do not know if the output array ends in the middle of an utf-8 sequence
+ m_output += m_proc->readAllStandardOutput();
+
+ int pos;
+ while ((pos = m_output.indexOf('\n')) != -1) {
+ QString line = QString::fromLocal8Bit(m_output, pos + 1);
+ m_output.remove(0, pos + 1);
+
+ emit newLine(line);
+ }
+}
+
+void BacktraceGenerator::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus)
+{
+ //these are useless now
+ m_proc->deleteLater();
+ m_temp->deleteLater();
+ m_proc = NULL;
+ m_temp = NULL;
+
+ //mark the end of the backtrace for the parser
+ emit newLine(QString());
+
+ if (exitStatus != QProcess::NormalExit || exitCode != 0) {
+ m_state = Failed;
+ emit someError();
+ return;
+ }
+
+ //no translation, string appears in the report
+ QString tmp("Application: %progname (%execname), signal: %signame\n");
+ Debugger::expandString(tmp);
+
+ m_parsedBacktrace = tmp + m_parser->parsedBacktrace();
+ m_state = Loaded;
+
+#ifdef BACKTRACE_PARSER_DEBUG
+ //append the raw unparsed backtrace
+ m_parsedBacktrace += "\n------------ Unparsed Backtrace ------------\n";
+ m_parsedBacktrace += m_debugParser->parsedBacktrace(); //it's not really parsed, it's from the null parser.
+#endif
+
+ emit done();
+}
+
+#include "backtracegenerator.moc"
diff --git a/drkonqi/backtracegenerator.h b/drkonqi/backtracegenerator.h
new file mode 100644
index 00000000..52c3539b
--- /dev/null
+++ b/drkonqi/backtracegenerator.h
@@ -0,0 +1,92 @@
+/*****************************************************************
+ * drkonqi - The KDE Crash Handler
+ *
+ * Copyright (C) 2000-2003 Hans Petter Bieker
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *****************************************************************/
+
+#ifndef BACKTRACEGENERATOR_H
+#define BACKTRACEGENERATOR_H
+
+#include
+
+#include "debugger.h"
+
+class KTemporaryFile;
+class BacktraceParser;
+
+class BacktraceGenerator : public QObject
+{
+ Q_OBJECT
+
+public:
+ enum State { NotLoaded, Loading, Loaded, Failed, FailedToStart };
+
+ BacktraceGenerator(const Debugger & debugger, QObject *parent);
+ ~BacktraceGenerator();
+
+ State state() const {
+ return m_state;
+ }
+
+ BacktraceParser *parser() const {
+ return m_parser;
+ }
+
+ QString backtrace() const {
+ return m_parsedBacktrace;
+ }
+
+ const Debugger debugger() const {
+ return m_debugger;
+ }
+
+public Q_SLOTS:
+ bool start();
+
+Q_SIGNALS:
+ void starting();
+ void newLine(const QString &str); // emitted for every line
+ void someError();
+ void failedToStart();
+ void done();
+
+private Q_SLOTS:
+ void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
+ void slotReadInput();
+
+private:
+ const Debugger m_debugger;
+ KProcess * m_proc;
+ KTemporaryFile * m_temp;
+ QByteArray m_output;
+ State m_state;
+ BacktraceParser * m_parser;
+ QString m_parsedBacktrace;
+
+#ifdef BACKTRACE_PARSER_DEBUG
+ BacktraceParser * m_debugParser;
+#endif
+};
+
+#endif
diff --git a/drkonqi/backtraceratingwidget.cpp b/drkonqi/backtraceratingwidget.cpp
new file mode 100644
index 00000000..2858c767
--- /dev/null
+++ b/drkonqi/backtraceratingwidget.cpp
@@ -0,0 +1,97 @@
+/*******************************************************************
+* backtraceratingwidget.cpp
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#include "backtraceratingwidget.h"
+
+#include
+#include
+
+#include
+
+BacktraceRatingWidget::BacktraceRatingWidget(QWidget * parent) :
+ QWidget(parent),
+ m_state(BacktraceGenerator::NotLoaded),
+ m_star1(false),
+ m_star2(false),
+ m_star3(false)
+{
+ setMinimumSize(105, 24);
+
+ m_starPixmap = KIcon("favorites").pixmap(QSize(22, 22));
+ m_disabledStarPixmap = KIcon("favorites").pixmap(QSize(22, 22), QIcon::Disabled);
+ m_errorPixmap = KIcon("dialog-error").pixmap(QSize(22, 22));
+}
+
+void BacktraceRatingWidget::setUsefulness(BacktraceParser::Usefulness usefulness)
+{
+ switch (usefulness) {
+ case BacktraceParser::ReallyUseful: {
+ m_star1 = true;
+ m_star2 = true;
+ m_star3 = true;
+ break;
+ }
+ case BacktraceParser::MayBeUseful: {
+ m_star1 = true;
+ m_star2 = true;
+ m_star3 = false;
+ break;
+ }
+ case BacktraceParser::ProbablyUseless: {
+ m_star1 = true;
+ m_star2 = false;
+ m_star3 = false;
+ break;
+ }
+ case BacktraceParser::Useless:
+ case BacktraceParser::InvalidUsefulness: {
+ m_star1 = false;
+ m_star2 = false;
+ m_star3 = false;
+ break;
+ }
+ }
+
+ update();
+}
+
+void BacktraceRatingWidget::paintEvent(QPaintEvent * event)
+{
+ Q_UNUSED(event);
+
+ QPainter p(this);
+
+ p.drawPixmap(QPoint(30, 1) , m_star1 ? m_starPixmap : m_disabledStarPixmap);
+ p.drawPixmap(QPoint(55, 1) , m_star2 ? m_starPixmap : m_disabledStarPixmap);
+ p.drawPixmap(QPoint(80, 1) , m_star3 ? m_starPixmap : m_disabledStarPixmap);
+
+ switch (m_state) {
+ case BacktraceGenerator::Failed:
+ case BacktraceGenerator::FailedToStart: {
+ p.drawPixmap(QPoint(0, 1) , m_errorPixmap);
+ break;
+ }
+ case BacktraceGenerator::Loading:
+ case BacktraceGenerator::Loaded:
+ default:
+ break;
+ }
+
+ p.end();
+}
diff --git a/drkonqi/backtraceratingwidget.h b/drkonqi/backtraceratingwidget.h
new file mode 100644
index 00000000..1e8f9a9b
--- /dev/null
+++ b/drkonqi/backtraceratingwidget.h
@@ -0,0 +1,60 @@
+/*******************************************************************
+* backtraceratingwidget.h
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#ifndef BACKTRACERATINGWIDGET__H
+#define BACKTRACERATINGWIDGET__H
+
+#include
+
+#include "parser/backtraceparser.h"
+#include "backtracegenerator.h"
+
+class QPixmap;
+
+class BacktraceRatingWidget: public QWidget
+{
+ Q_OBJECT
+
+public:
+
+ explicit BacktraceRatingWidget(QWidget *);
+ void setUsefulness(BacktraceParser::Usefulness);
+ void setState(BacktraceGenerator::State s) {
+ m_state = s; update();
+ }
+
+protected:
+
+ void paintEvent(QPaintEvent * event);
+
+private:
+
+ BacktraceGenerator::State m_state;
+
+ bool m_star1;
+ bool m_star2;
+ bool m_star3;
+
+ QPixmap m_errorPixmap;
+
+ QPixmap m_starPixmap;
+ QPixmap m_disabledStarPixmap;
+};
+
+#endif
diff --git a/drkonqi/backtracewidget.cpp b/drkonqi/backtracewidget.cpp
new file mode 100644
index 00000000..c0a307f1
--- /dev/null
+++ b/drkonqi/backtracewidget.cpp
@@ -0,0 +1,408 @@
+/*******************************************************************
+* backtracewidget.cpp
+* Copyright 2009,2010 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#include "backtracewidget.h"
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include "drkonqi.h"
+#include "backtraceratingwidget.h"
+#include "crashedapplication.h"
+#include "backtracegenerator.h"
+#include "parser/backtraceparser.h"
+#include "drkonqi_globals.h"
+#include "debuggermanager.h"
+#include "gdbhighlighter.h"
+
+static const char extraDetailsLabelMargin[] = " margin: 5px; ";
+
+BacktraceWidget::BacktraceWidget(BacktraceGenerator *generator, QWidget *parent,
+ bool showToggleBacktrace) :
+ QWidget(parent),
+ m_btGenerator(generator),
+ m_highlighter(0)
+{
+ ui.setupUi(this);
+
+ //Debug package installer
+ m_debugPackageInstaller = new DebugPackageInstaller(this);
+ connect(m_debugPackageInstaller, SIGNAL(error(QString)), this, SLOT(debugPackageError(QString)));
+ connect(m_debugPackageInstaller, SIGNAL(packagesInstalled()), this, SLOT(regenerateBacktrace()));
+ connect(m_debugPackageInstaller, SIGNAL(canceled()), this, SLOT(debugPackageCanceled()));
+
+ connect(m_btGenerator, SIGNAL(done()) , this, SLOT(loadData()));
+ connect(m_btGenerator, SIGNAL(someError()) , this, SLOT(loadData()));
+ connect(m_btGenerator, SIGNAL(failedToStart()) , this, SLOT(loadData()));
+ connect(m_btGenerator, SIGNAL(newLine(QString)) , this, SLOT(backtraceNewLine(QString)));
+
+ connect(ui.m_extraDetailsLabel, SIGNAL(linkActivated(QString)), this,
+ SLOT(extraDetailsLinkActivated(QString)));
+ ui.m_extraDetailsLabel->setVisible(false);
+ ui.m_extraDetailsLabel->setStyleSheet(QLatin1String(extraDetailsLabelMargin));
+
+ //Setup the buttons
+ ui.m_reloadBacktraceButton->setGuiItem(
+ KGuiItem2(i18nc("@action:button", "&Reload"),
+ KIcon("view-refresh"), i18nc("@info:tooltip", "Use this button to "
+ "reload the crash information (backtrace). This is useful when you have "
+ "installed the proper debug symbol packages and you want to obtain "
+ "a better backtrace.")));
+ connect(ui.m_reloadBacktraceButton, SIGNAL(clicked()), this, SLOT(regenerateBacktrace()));
+
+ ui.m_installDebugButton->setGuiItem(
+ KGuiItem2(i18nc("@action:button", "&Install Debug Symbols"),
+ KIcon("system-software-update"), i18nc("@info:tooltip", "Use this button to "
+ "install the missing debug symbols packages.")));
+ ui.m_installDebugButton->setVisible(false);
+ connect(ui.m_installDebugButton, SIGNAL(clicked()), this, SLOT(installDebugPackages()));
+
+ ui.m_copyButton->setGuiItem(KGuiItem2(QString(), KIcon("edit-copy"),
+ i18nc("@info:tooltip", "Use this button to copy the "
+ "crash information (backtrace) to the clipboard.")));
+ connect(ui.m_copyButton, SIGNAL(clicked()) , this, SLOT(copyClicked()));
+ ui.m_copyButton->setEnabled(false);
+
+ ui.m_saveButton->setGuiItem(KGuiItem2(QString(),
+ KIcon("document-save"),
+ i18nc("@info:tooltip", "Use this button to save the "
+ "crash information (backtrace) to a file. This is useful "
+ "if you want to take a look at it or to report the bug "
+ "later.")));
+ connect(ui.m_saveButton, SIGNAL(clicked()) , this, SLOT(saveClicked()));
+ ui.m_saveButton->setEnabled(false);
+
+ //Create the rating widget
+ m_backtraceRatingWidget = new BacktraceRatingWidget(ui.m_statusWidget);
+ ui.m_statusWidget->addCustomStatusWidget(m_backtraceRatingWidget);
+
+ ui.m_statusWidget->setIdle(QString());
+
+ //Do we need the "Show backtrace" toggle action ?
+ if (!showToggleBacktrace) {
+ ui.mainLayout->removeWidget(ui.m_toggleBacktraceCheckBox);
+ ui.m_toggleBacktraceCheckBox->setVisible(false);
+ toggleBacktrace(true);
+ } else {
+ //Generate help widget
+ ui.m_backtraceHelpLabel->setText(
+ i18n("
What is a \"backtrace\" ?
A backtrace basically describes what was "
+ "happening inside the application when it crashed, so the developers may track "
+ "down where the mess started. They may look meaningless to you, but they might "
+ "actually contain a wealth of useful information. Backtraces are commonly "
+ "used during interactive and post-mortem debugging.
"));
+ ui.m_backtraceHelpIcon->setPixmap(KIcon("help-hint").pixmap(48,48));
+ connect(ui.m_toggleBacktraceCheckBox, SIGNAL(toggled(bool)), this,
+ SLOT(toggleBacktrace(bool)));
+ toggleBacktrace(false);
+ }
+
+ ui.m_backtraceEdit->setFont( KGlobalSettings::fixedFont() );
+}
+
+void BacktraceWidget::setAsLoading()
+{
+ //remove the syntax highlighter
+ delete m_highlighter;
+ m_highlighter = 0;
+
+ //Set the widget as loading and disable all the action buttons
+ ui.m_backtraceEdit->setText(i18nc("@info:status", "Loading..."));
+ ui.m_backtraceEdit->setEnabled(false);
+
+ ui.m_statusWidget->setBusy(i18nc("@info:status",
+ "Generating backtrace... (this may take some time)"));
+ m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
+ m_backtraceRatingWidget->setState(BacktraceGenerator::Loading);
+
+ ui.m_extraDetailsLabel->setVisible(false);
+ ui.m_extraDetailsLabel->clear();
+
+ ui.m_installDebugButton->setVisible(false);
+ ui.m_reloadBacktraceButton->setEnabled(false);
+
+ ui.m_copyButton->setEnabled(false);
+ ui.m_saveButton->setEnabled(false);
+}
+
+//Force backtrace generation
+void BacktraceWidget::regenerateBacktrace()
+{
+ setAsLoading();
+
+ if (!DrKonqi::debuggerManager()->debuggerIsRunning()) {
+ m_btGenerator->start();
+ } else {
+ anotherDebuggerRunning();
+ }
+
+ emit stateChanged();
+}
+
+void BacktraceWidget::generateBacktrace()
+{
+ if (m_btGenerator->state() == BacktraceGenerator::NotLoaded) {
+ //First backtrace generation
+ regenerateBacktrace();
+ } else if (m_btGenerator->state() == BacktraceGenerator::Loading) {
+ //Set in loading state, the widget will catch the backtrace events anyway
+ setAsLoading();
+ emit stateChanged();
+ } else {
+ //*Finished* states
+ setAsLoading();
+ emit stateChanged();
+ //Load already generated information
+ loadData();
+ }
+}
+
+void BacktraceWidget::anotherDebuggerRunning()
+{
+ //As another debugger is running, we should disable the actions and notify the user
+ ui.m_backtraceEdit->setEnabled(false);
+ ui.m_backtraceEdit->setText(i18nc("@info", "Another debugger is currently debugging the "
+ "same application. The crash information could not be fetched."));
+ m_backtraceRatingWidget->setState(BacktraceGenerator::Failed);
+ m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
+ ui.m_statusWidget->setIdle(i18nc("@info:status", "The crash information could not be fetched."));
+ ui.m_extraDetailsLabel->setVisible(true);
+ ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "Another debugging process is attached to "
+ "the crashed application. Therefore, the DrKonqi debugger cannot "
+ "fetch the backtrace. Please close the other debugger and "
+ "click Reload."));
+ ui.m_installDebugButton->setVisible(false);
+ ui.m_reloadBacktraceButton->setEnabled(true);
+}
+
+void BacktraceWidget::loadData()
+{
+ //Load the backtrace data from the generator
+ m_backtraceRatingWidget->setState(m_btGenerator->state());
+
+ if (m_btGenerator->state() == BacktraceGenerator::Loaded) {
+ ui.m_backtraceEdit->setEnabled(true);
+ ui.m_backtraceEdit->setPlainText(m_btGenerator->backtrace());
+
+ // scroll to crash
+ QTextCursor crashCursor = ui.m_backtraceEdit->document()->find("[KCrash Handler]");
+ if (!crashCursor.isNull()) {
+ crashCursor.movePosition(QTextCursor::Up, QTextCursor::MoveAnchor);
+ ui.m_backtraceEdit->verticalScrollBar()->setValue(ui.m_backtraceEdit->cursorRect(crashCursor).top());
+ }
+
+ // highlight if possible
+ if (m_btGenerator->debugger().codeName() == "gdb") {
+ m_highlighter = new GdbHighlighter(ui.m_backtraceEdit->document(),
+ m_btGenerator->parser()->parsedBacktraceLines());
+ }
+
+ BacktraceParser * btParser = m_btGenerator->parser();
+ m_backtraceRatingWidget->setUsefulness(btParser->backtraceUsefulness());
+
+ //Generate the text to put in the status widget (backtrace usefulness)
+ QString usefulnessText;
+ switch (btParser->backtraceUsefulness()) {
+ case BacktraceParser::ReallyUseful:
+ usefulnessText = i18nc("@info", "The generated crash information is useful");
+ break;
+ case BacktraceParser::MayBeUseful:
+ usefulnessText = i18nc("@info", "The generated crash information may be useful");
+ break;
+ case BacktraceParser::ProbablyUseless:
+ usefulnessText = i18nc("@info", "The generated crash information is probably not useful");
+ break;
+ case BacktraceParser::Useless:
+ usefulnessText = i18nc("@info", "The generated crash information is not useful");
+ break;
+ default:
+ //let's hope nobody will ever see this... ;)
+ usefulnessText = i18nc("@info", "The rating of this crash information is invalid. "
+ "This is a bug in DrKonqi itself.");
+ break;
+ }
+ ui.m_statusWidget->setIdle(usefulnessText);
+
+ if (btParser->backtraceUsefulness() != BacktraceParser::ReallyUseful) {
+ //Not a perfect bactrace, ask the user to try to improve it
+ ui.m_extraDetailsLabel->setVisible(true);
+ if (canInstallDebugPackages()) {
+ //The script to install the debug packages is available
+ ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "You can click the "
+ "Install Debug Symbols button in order to automatically "
+ "install the missing debugging information packages. If this method "
+ "does not work: please read How to "
+ "create useful crash reports to learn how to get a useful "
+ "backtrace; install the needed packages ("
+ "list of files) and click the "
+ "Reload button.",
+ QLatin1String(TECHBASE_HOWTO_DOC),
+ QLatin1String("#missingDebugPackages")));
+ ui.m_installDebugButton->setVisible(true);
+ //Retrieve the libraries with missing debug info
+ QStringList missingLibraries = btParser->librariesWithMissingDebugSymbols().toList();
+ m_debugPackageInstaller->setMissingLibraries(missingLibraries);
+ } else {
+ //No automated method to install the missing debug info
+ //Tell the user to read the howto and reload
+ ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "Please read How to "
+ "create useful crash reports to learn how to get a useful "
+ "backtrace; install the needed packages ("
+ "list of files) and click the "
+ "Reload button.",
+ QLatin1String(TECHBASE_HOWTO_DOC),
+ QLatin1String("#missingDebugPackages")));
+ }
+ }
+
+ ui.m_copyButton->setEnabled(true);
+ ui.m_saveButton->setEnabled(true);
+ } else if (m_btGenerator->state() == BacktraceGenerator::Failed) {
+ //The backtrace could not be generated because the debugger had an error
+ m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
+
+ ui.m_statusWidget->setIdle(i18nc("@info:status", "The debugger has quit unexpectedly."));
+
+ ui.m_backtraceEdit->setPlainText(i18nc("@info:status",
+ "The crash information could not be generated."));
+
+ ui.m_extraDetailsLabel->setVisible(true);
+ ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "You could try to regenerate the "
+ "backtrace by clicking the Reload"
+ " button."));
+ } else if (m_btGenerator->state() == BacktraceGenerator::FailedToStart) {
+ //The backtrace could not be generated because the debugger could not start (missing)
+ //Tell the user to install it.
+ m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
+
+ ui.m_statusWidget->setIdle(i18nc("@info:status", "The debugger application is missing or "
+ "could not be launched."));
+
+ ui.m_backtraceEdit->setPlainText(i18nc("@info:status",
+ "The crash information could not be generated."));
+ ui.m_extraDetailsLabel->setVisible(true);
+ ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "You need to first install the debugger "
+ "application (%1) then click the Reload"
+ " button.",
+ m_btGenerator->debugger().name()));
+ }
+
+ ui.m_reloadBacktraceButton->setEnabled(true);
+ emit stateChanged();
+}
+
+void BacktraceWidget::backtraceNewLine(const QString & line)
+{
+ //While loading the backtrace (unparsed) a new line was sent from the debugger, append it
+ ui.m_backtraceEdit->append(line.trimmed());
+}
+
+void BacktraceWidget::copyClicked()
+{
+ ui.m_backtraceEdit->selectAll();
+ ui.m_backtraceEdit->copy();
+}
+
+void BacktraceWidget::saveClicked()
+{
+ DrKonqi::saveReport(m_btGenerator->backtrace(), this);
+}
+
+void BacktraceWidget::hilightExtraDetailsLabel(bool hilight)
+{
+ QString stylesheet;
+ if (hilight) {
+ stylesheet = QLatin1String("border-width: 2px; "
+ "border-style: solid; "
+ "border-color: red;");
+ } else {
+ stylesheet = QLatin1String("border-width: 0px;");
+ }
+ stylesheet += QLatin1String(extraDetailsLabelMargin);
+ ui.m_extraDetailsLabel->setStyleSheet(stylesheet);
+}
+
+void BacktraceWidget::focusImproveBacktraceButton()
+{
+ ui.m_installDebugButton->setFocus();
+}
+
+void BacktraceWidget::installDebugPackages()
+{
+ ui.m_installDebugButton->setVisible(false);
+ m_debugPackageInstaller->installDebugPackages();
+}
+
+void BacktraceWidget::debugPackageError(const QString & errorMessage)
+{
+ ui.m_installDebugButton->setVisible(true);
+ KMessageBox::error(this, errorMessage, i18nc("@title:window", "Error during the installation of"
+ " debug symbols"));
+}
+
+void BacktraceWidget::debugPackageCanceled()
+{
+ ui.m_installDebugButton->setVisible(true);
+}
+
+bool BacktraceWidget::canInstallDebugPackages() const
+{
+ return m_debugPackageInstaller->canInstallDebugPackages();
+}
+
+void BacktraceWidget::toggleBacktrace(bool show)
+{
+ ui.m_backtraceStack->setCurrentWidget(show ? ui.backtracePage : ui.backtraceHelpPage);
+}
+
+void BacktraceWidget::extraDetailsLinkActivated(QString link)
+{
+ if (link.startsWith(QLatin1String("http"))) {
+ //Open externally
+ KToolInvocation::invokeBrowser(link);
+ } else if (link == QLatin1String("#missingDebugPackages")) {
+ BacktraceParser * btParser = m_btGenerator->parser();
+
+ QStringList missingDbgForFiles = btParser->librariesWithMissingDebugSymbols().toList();
+ missingDbgForFiles.insert(0, DrKonqi::crashedApplication()->executable().absoluteFilePath());
+
+ //HTML message
+ QString message;
+ message = "";
+ message += i18n("The packages containing debug information for the following application and libraries are missing:");
+ message += "
";
+
+ KMessageBox::information(this, message, i18nc("messagebox title","Missing debug information packages"));
+ }
+}
+
diff --git a/drkonqi/backtracewidget.h b/drkonqi/backtracewidget.h
new file mode 100644
index 00000000..3cfcadc9
--- /dev/null
+++ b/drkonqi/backtracewidget.h
@@ -0,0 +1,78 @@
+/*******************************************************************
+* backtracewidget.h
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#ifndef BACKTRACEWIDGET__H
+#define BACKTRACEWIDGET__H
+
+#include
+
+#include "debugpackageinstaller.h"
+#include "ui_backtracewidget.h"
+
+class QSyntaxHighlighter;
+class BacktraceRatingWidget;
+class BacktraceGenerator;
+
+class BacktraceWidget: public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit BacktraceWidget(BacktraceGenerator *generator, QWidget *parent = 0,
+ bool showToggleBacktrace = false);
+
+ bool canInstallDebugPackages() const;
+
+public Q_SLOTS:
+ void generateBacktrace();
+ void hilightExtraDetailsLabel(bool hilight);
+ void focusImproveBacktraceButton();
+
+ void toggleBacktrace(bool show);
+ void extraDetailsLinkActivated(QString link);
+
+Q_SIGNALS:
+ void stateChanged();
+
+private:
+ BacktraceGenerator * m_btGenerator;
+ Ui::Form ui;
+ BacktraceRatingWidget * m_backtraceRatingWidget;
+ QSyntaxHighlighter *m_highlighter;
+ DebugPackageInstaller * m_debugPackageInstaller;
+
+ void setAsLoading();
+
+private Q_SLOTS:
+ void loadData();
+ void backtraceNewLine(const QString &);
+
+ void regenerateBacktrace();
+
+ void saveClicked();
+ void copyClicked();
+
+ void anotherDebuggerRunning();
+
+ void installDebugPackages();
+ void debugPackageError(const QString &);
+ void debugPackageCanceled();
+};
+
+#endif
diff --git a/drkonqi/bugreportaddress.h b/drkonqi/bugreportaddress.h
new file mode 100644
index 00000000..c64331c2
--- /dev/null
+++ b/drkonqi/bugreportaddress.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef BUGREPORTADDRESS_H
+#define BUGREPORTADDRESS_H
+
+#include
+
+#include "drkonqi_globals.h"
+
+class BugReportAddress : public QString
+{
+public:
+ inline BugReportAddress() : QString() {}
+ inline BugReportAddress(const QString & address)
+ : QString(address == QLatin1String("submit@bugs.kde.org") ?
+ QLatin1String(KDE_BUGZILLA_URL) : address)
+ {}
+
+ inline bool isKdeBugzilla() const
+ {
+ return *this == QLatin1String(KDE_BUGZILLA_URL);
+ }
+
+ inline bool isEmail() const
+ {
+ return contains('@');
+ }
+};
+
+#endif
diff --git a/drkonqi/config-drkonqi.h.cmake b/drkonqi/config-drkonqi.h.cmake
new file mode 100644
index 00000000..f5723d50
--- /dev/null
+++ b/drkonqi/config-drkonqi.h.cmake
@@ -0,0 +1,3 @@
+#cmakedefine HAVE_STRSIGNAL 1
+#cmakedefine HAVE_UNAME 1
+#define DEBUG_PACKAGE_INSTALLER_NAME "@DEBUG_PACKAGE_INSTALLER_NAME@"
diff --git a/drkonqi/crashedapplication.cpp b/drkonqi/crashedapplication.cpp
new file mode 100644
index 00000000..ef63232b
--- /dev/null
+++ b/drkonqi/crashedapplication.cpp
@@ -0,0 +1,186 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include
+
+#include "crashedapplication.h"
+
+#if defined(HAVE_STRSIGNAL) && defined(Q_OS_UNIX)
+# include
+# include
+# include
+#else
+# if defined(Q_OS_UNIX)
+# include
+# else
+# include
+# endif
+#endif
+
+#include
+
+CrashedApplication::CrashedApplication(QObject *parent)
+ : QObject(parent), m_restarted(false)
+{
+}
+
+CrashedApplication::~CrashedApplication()
+{
+}
+
+QString CrashedApplication::name() const
+{
+ return m_name;
+}
+
+QFileInfo CrashedApplication::executable() const
+{
+ return m_executable;
+}
+
+QString CrashedApplication::fakeExecutableBaseName() const
+{
+ if (!m_fakeBaseName.isEmpty()) {
+ return m_fakeBaseName;
+ } else {
+ return m_executable.baseName();
+ }
+}
+
+QString CrashedApplication::version() const
+{
+ return m_version;
+}
+
+BugReportAddress CrashedApplication::bugReportAddress() const
+{
+ return m_reportAddress;
+}
+
+int CrashedApplication::pid() const
+{
+ return m_pid;
+}
+
+int CrashedApplication::signalNumber() const
+{
+ return m_signalNumber;
+}
+
+QString CrashedApplication::signalName() const
+{
+#if defined(HAVE_STRSIGNAL) && defined(Q_OS_UNIX)
+ const char * oldLocale = std::setlocale(LC_MESSAGES, NULL);
+ char * savedLocale;
+ if (oldLocale) {
+ savedLocale = strdup(oldLocale);
+ } else {
+ savedLocale = NULL;
+ }
+ std::setlocale(LC_MESSAGES, "C");
+ const char *name = strsignal(m_signalNumber);
+ std::setlocale(LC_MESSAGES, savedLocale);
+ std::free(savedLocale);
+ return QString::fromLocal8Bit(name != NULL ? name : "Unknown");
+#else
+ switch (m_signalNumber) {
+# if defined(Q_OS_UNIX)
+ case SIGILL: return QLatin1String("SIGILL");
+ case SIGABRT: return QLatin1String("SIGABRT");
+ case SIGFPE: return QLatin1String("SIGFPE");
+ case SIGSEGV: return QLatin1String("SIGSEGV");
+ case SIGBUS: return QLatin1String("SIGBUS");
+# else
+ case EXCEPTION_ACCESS_VIOLATION: return QLatin1String("EXCEPTION_ACCESS_VIOLATION");
+ case EXCEPTION_DATATYPE_MISALIGNMENT: return QLatin1String("EXCEPTION_DATATYPE_MISALIGNMENT");
+ case EXCEPTION_BREAKPOINT: return QLatin1String("EXCEPTION_BREAKPOINT");
+ case EXCEPTION_SINGLE_STEP: return QLatin1String("EXCEPTION_SINGLE_STEP");
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: return QLatin1String("EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
+ case EXCEPTION_FLT_DENORMAL_OPERAND: return QLatin1String("EXCEPTION_FLT_DENORMAL_OPERAND");
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO: return QLatin1String("EXCEPTION_FLT_DIVIDE_BY_ZERO");
+ case EXCEPTION_FLT_INEXACT_RESULT: return QLatin1String("EXCEPTION_FLT_INEXACT_RESULT");
+ case EXCEPTION_FLT_INVALID_OPERATION: return QLatin1String("EXCEPTION_FLT_INVALID_OPERATION");
+ case EXCEPTION_FLT_OVERFLOW: return QLatin1String("EXCEPTION_FLT_OVERFLOW");
+ case EXCEPTION_FLT_STACK_CHECK: return QLatin1String("EXCEPTION_FLT_STACK_CHECK");
+ case EXCEPTION_FLT_UNDERFLOW: return QLatin1String("EXCEPTION_FLT_UNDERFLOW");
+ case EXCEPTION_INT_DIVIDE_BY_ZERO: return QLatin1String("EXCEPTION_INT_DIVIDE_BY_ZERO");
+ case EXCEPTION_INT_OVERFLOW: return QLatin1String("EXCEPTION_INT_OVERFLOW");
+ case EXCEPTION_PRIV_INSTRUCTION: return QLatin1String("EXCEPTION_PRIV_INSTRUCTION");
+ case EXCEPTION_IN_PAGE_ERROR: return QLatin1String("EXCEPTION_IN_PAGE_ERROR");
+ case EXCEPTION_ILLEGAL_INSTRUCTION: return QLatin1String("EXCEPTION_ILLEGAL_INSTRUCTION");
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION: return QLatin1String("EXCEPTION_NONCONTINUABLE_EXCEPTION");
+ case EXCEPTION_STACK_OVERFLOW: return QLatin1String("EXCEPTION_STACK_OVERFLOW");
+ case EXCEPTION_INVALID_DISPOSITION: return QLatin1String("EXCEPTION_INVALID_DISPOSITION");
+# endif
+ default: return QLatin1String("Unknown");
+ }
+#endif
+}
+
+bool CrashedApplication::hasBeenRestarted() const
+{
+ return m_restarted;
+}
+
+int CrashedApplication::thread() const
+{
+ return m_thread;
+}
+
+const QDateTime& CrashedApplication::datetime() const
+{
+ return m_datetime;
+}
+
+void CrashedApplication::restart()
+{
+ if (m_restarted) {
+ return;
+ }
+
+ int ret = -1;
+
+ //start the application via kdeinit, as it needs to have a pristine environment and
+ //KProcess::startDetached() can't start a new process with custom environment variables.
+ if (!m_fakeBaseName.isEmpty()) {
+ // if m_fakeBaseName is set, this means m_executable is the path to kdeinit4
+ // so we need to use the fakeBaseName to restart the app
+ ret = KToolInvocation::kdeinitExec(m_fakeBaseName);
+ } else {
+ ret = KToolInvocation::kdeinitExec(m_executable.absoluteFilePath());
+ }
+
+ const bool success = (ret == 0);
+
+ m_restarted = success;
+ emit restarted(success);
+}
+
+QString getSuggestedKCrashFilename(const CrashedApplication* app)
+{
+ QString filename = app->fakeExecutableBaseName() + '-' +
+ app->datetime().toString("yyyyMMdd-hhmmss") +
+ ".kcrash.txt";
+
+ if (filename.contains('/')) {
+ filename = filename.mid(filename.lastIndexOf('/') + 1);
+ }
+
+ return filename;
+}
+
+#include "crashedapplication.moc"
diff --git a/drkonqi/crashedapplication.h b/drkonqi/crashedapplication.h
new file mode 100644
index 00000000..59672f87
--- /dev/null
+++ b/drkonqi/crashedapplication.h
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef CRASHEDAPPLICATION_H
+#define CRASHEDAPPLICATION_H
+
+#include
+#include
+#include
+
+#include "bugreportaddress.h"
+
+class KCrashBackend;
+
+class CrashedApplication : public QObject
+{
+ Q_OBJECT
+public:
+ virtual ~CrashedApplication();
+
+ /** Returns the crashed program's name, possibly translated (ex. "The KDE Crash Handler") */
+ QString name() const;
+
+ /** Returns a QFileInfo with information about the executable that crashed */
+ QFileInfo executable() const;
+
+ /** When an application is run via kdeinit, the executable() method returns kdeinit4, but
+ * we still need a way to know which is the application that was loaded by kdeinit. So,
+ * this method returns the base name of the executable that would have been launched if
+ * the app had not been loaded by kdeinit (ex. "plasma-desktop"). If the application was
+ * not launched via kdeinit, this method returns executable().baseName();
+ */
+ QString fakeExecutableBaseName() const;
+
+ /** Returns the version of the crashed program */
+ QString version() const;
+
+ /** Returns the address where the bug report for this application should go */
+ BugReportAddress bugReportAddress() const;
+
+ /** Returns the pid of the crashed program */
+ int pid() const;
+
+ /** Returns the signal number that the crashed program received */
+ int signalNumber() const;
+
+ /** Returns the name of the signal (ex. SIGSEGV) */
+ QString signalName() const;
+
+ bool hasBeenRestarted() const;
+
+ int thread() const;
+
+ const QDateTime& datetime() const;
+
+public slots:
+ void restart();
+
+signals:
+ void restarted(bool success);
+
+protected:
+ friend class KCrashBackend;
+ CrashedApplication(QObject *parent = 0);
+
+ int m_pid;
+ int m_signalNumber;
+ QString m_name;
+ QFileInfo m_executable;
+ QString m_fakeBaseName;
+ QString m_version;
+ BugReportAddress m_reportAddress;
+ bool m_restarted;
+ int m_thread;
+ QDateTime m_datetime;
+};
+
+QString getSuggestedKCrashFilename(const CrashedApplication* app);
+
+#endif // CRASHEDAPPLICATION_H
diff --git a/drkonqi/data/CMakeLists.txt b/drkonqi/data/CMakeLists.txt
new file mode 100644
index 00000000..917e0386
--- /dev/null
+++ b/drkonqi/data/CMakeLists.txt
@@ -0,0 +1,3 @@
+install(FILES crash.png DESTINATION ${DATA_INSTALL_DIR}/drkonqi/pics)
+install(FILES mappings DESTINATION ${DATA_INSTALL_DIR}/drkonqi)
+install(DIRECTORY debuggers DESTINATION ${DATA_INSTALL_DIR}/drkonqi PATTERN ".svn" EXCLUDE)
diff --git a/drkonqi/data/crash.png b/drkonqi/data/crash.png
new file mode 100644
index 00000000..c2f7ca30
Binary files /dev/null and b/drkonqi/data/crash.png differ
diff --git a/drkonqi/data/debuggers/external/gdbrc b/drkonqi/data/debuggers/external/gdbrc
new file mode 100644
index 00000000..70f715a6
--- /dev/null
+++ b/drkonqi/data/debuggers/external/gdbrc
@@ -0,0 +1,80 @@
+[General]
+Name=gdb
+Name[ar]=gdb
+Name[ast]=gdb
+Name[bg]=gdb
+Name[bn]=gdb
+Name[bs]=GDB
+Name[ca]=gdb
+Name[ca@valencia]=gdb
+Name[cs]=gdb
+Name[csb]=gdb
+Name[da]=gdb
+Name[de]=gdb
+Name[el]=gdb
+Name[en_GB]=gdb
+Name[eo]=gdb
+Name[es]=gdb
+Name[et]=gdb
+Name[eu]=gdb
+Name[fa]=gdb
+Name[fi]=gdb
+Name[fr]=gdb
+Name[fy]=gdb
+Name[ga]=gdb
+Name[gl]=gdb
+Name[gu]=gdb
+Name[he]=gdb
+Name[hi]=gdb
+Name[hr]=gdb
+Name[hu]=gdb
+Name[ia]=gdb
+Name[id]=gdb
+Name[is]=gdb
+Name[it]=gdb
+Name[ja]=gdb
+Name[ka]=gdb
+Name[kk]=gdb
+Name[km]=gdb
+Name[kn]=gdb
+Name[ko]=gdb
+Name[lt]=gdb
+Name[lv]=gdb
+Name[mai]=gdb
+Name[mk]=gdb
+Name[ml]=ജിഡിബി
+Name[mr]=gdb
+Name[nb]=gdb
+Name[nds]=gdb
+Name[nl]=gdb
+Name[nn]=gdb
+Name[pa]=gdb
+Name[pl]=gdb
+Name[pt]=gdb
+Name[pt_BR]=gdb
+Name[ro]=gdb
+Name[ru]=gdb
+Name[si]=gdb
+Name[sk]=gdb
+Name[sl]=gdb
+Name[sr]=ГДБ
+Name[sr@ijekavian]=ГДБ
+Name[sr@ijekavianlatin]=GDB
+Name[sr@latin]=GDB
+Name[sv]=gdb
+Name[tg]=gdb
+Name[th]=gdb
+Name[tr]=gdb
+Name[ug]=gdb
+Name[uk]=gdb
+Name[vi]=gdb
+Name[wa]=gdb
+Name[x-test]=xxgdbxx
+Name[zh_CN]=gdb
+Name[zh_TW]=gdb
+TryExec=gdb
+Backends=KCrash
+
+[KCrash]
+Exec=konsole --nofork -e gdb -nw -p %pid %execpath
+Terminal=true
diff --git a/drkonqi/data/debuggers/external/kdbgrc b/drkonqi/data/debuggers/external/kdbgrc
new file mode 100644
index 00000000..3e3d9487
--- /dev/null
+++ b/drkonqi/data/debuggers/external/kdbgrc
@@ -0,0 +1,79 @@
+[General]
+Name=kdbg
+Name[ar]=kdbg
+Name[ast]=kdbg
+Name[bg]=kdbg
+Name[bn]=kdbg
+Name[bs]=Kdbg
+Name[ca]=kdbg
+Name[ca@valencia]=kdbg
+Name[cs]=kdbg
+Name[csb]=kdbg
+Name[da]=kdbg
+Name[de]=kdbg
+Name[el]=kdbg
+Name[en_GB]=kdbg
+Name[eo]=kdbg
+Name[es]=kdbg
+Name[et]=kdbg
+Name[eu]=kdbg
+Name[fa]=kdbg
+Name[fi]=kdbg
+Name[fr]=kdbg
+Name[fy]=kdbg
+Name[ga]=kdbg
+Name[gl]=kdbg
+Name[gu]=kdbg
+Name[he]=kdbg
+Name[hi]=kdbg
+Name[hr]=kdbg
+Name[hu]=kdbg
+Name[ia]=kdbg
+Name[id]=kdbg
+Name[is]=kdbg
+Name[it]=kdbg
+Name[ja]=kdbg
+Name[ka]=kdbg
+Name[kk]=kdbg
+Name[km]=kdbg
+Name[kn]=kdbg
+Name[ko]=kdbg
+Name[lt]=kdbg
+Name[lv]=kdbg
+Name[mai]=kdbg
+Name[mk]=kdbg
+Name[ml]=കെഡിബിജി
+Name[mr]=kdbg
+Name[nb]=kdbg
+Name[nds]=kgdb
+Name[nl]=kdbg
+Name[nn]=kdbg
+Name[pa]=kdbg
+Name[pl]=kdbg
+Name[pt]=kdbg
+Name[pt_BR]=kdbg
+Name[ro]=kdbg
+Name[ru]=kdbg
+Name[si]=kdbg
+Name[sk]=kdbg
+Name[sl]=kdbg
+Name[sr]=Кдбг
+Name[sr@ijekavian]=Кдбг
+Name[sr@ijekavianlatin]=KDbg
+Name[sr@latin]=KDbg
+Name[sv]=kdbg
+Name[tg]=kdbg
+Name[th]=kdbg
+Name[tr]=kdbg
+Name[ug]=kdbg
+Name[uk]=kdbg
+Name[vi]=kdbg
+Name[wa]=kdbg
+Name[x-test]=xxkdbgxx
+Name[zh_CN]=kdbg
+Name[zh_TW]=kdbg
+TryExec=kdbg
+Backends=KCrash
+
+[KCrash]
+Exec=kdbg -p %pid %execpath
diff --git a/drkonqi/data/debuggers/internal/dbxrc b/drkonqi/data/debuggers/internal/dbxrc
new file mode 100644
index 00000000..2cea7087
--- /dev/null
+++ b/drkonqi/data/debuggers/internal/dbxrc
@@ -0,0 +1,76 @@
+[General]
+Name=dbx
+Name[ar]=dbx
+Name[ast]=dbx
+Name[bg]=dbx
+Name[bn]=dbx
+Name[bs]=DBX
+Name[ca]=dbx
+Name[ca@valencia]=dbx
+Name[cs]=dbx
+Name[da]=dbx
+Name[de]=dbx
+Name[el]=dbx
+Name[en_GB]=dbx
+Name[eo]=dbx
+Name[es]=dbx
+Name[et]=dbx
+Name[eu]=dbx
+Name[fa]=dbx
+Name[fi]=dbx
+Name[fr]=dbx
+Name[ga]=dbx
+Name[gl]=dbx
+Name[gu]=dbx
+Name[he]=dbx
+Name[hi]=dbx
+Name[hr]=dbx
+Name[hu]=dbx
+Name[ia]=dbx
+Name[id]=dbx
+Name[is]=dbx
+Name[it]=dbx
+Name[ja]=dbx
+Name[kk]=dbx
+Name[km]=dbx
+Name[kn]=dbx
+Name[ko]=dbx
+Name[lt]=dbx
+Name[lv]=dbx
+Name[mai]=dbx
+Name[mr]=dbx
+Name[nb]=gdb
+Name[nds]=dbx
+Name[nl]=dbx
+Name[nn]=dbx
+Name[pa]=dbx
+Name[pl]=dbx
+Name[pt]=dbx
+Name[pt_BR]=dbx
+Name[ro]=dbx
+Name[ru]=dbx
+Name[si]=dbx
+Name[sk]=dbx
+Name[sl]=dbx
+Name[sr]=ДБИкс
+Name[sr@ijekavian]=ДБИкс
+Name[sr@ijekavianlatin]=DBX
+Name[sr@latin]=DBX
+Name[sv]=dbx
+Name[tg]=dbx
+Name[th]=dbx
+Name[tr]=dbx
+Name[ug]=dbx
+Name[uk]=dbx
+Name[vi]=dbx
+Name[wa]=dbx
+Name[x-test]=xxdbxxx
+Name[zh_CN]=dbx
+Name[zh_TW]=dbx
+TryExec=dbx
+Backends=KCrash
+
+[KCrash]
+Exec=dbx -c "where -l -v -h;quit" - %pid
+BatchCommands=where
+
diff --git a/drkonqi/data/debuggers/internal/gdbrc b/drkonqi/data/debuggers/internal/gdbrc
new file mode 100644
index 00000000..322c5b3c
--- /dev/null
+++ b/drkonqi/data/debuggers/internal/gdbrc
@@ -0,0 +1,80 @@
+[General]
+Name=gdb
+Name[ar]=gdb
+Name[ast]=gdb
+Name[bg]=gdb
+Name[bn]=gdb
+Name[bs]=GDB
+Name[ca]=gdb
+Name[ca@valencia]=gdb
+Name[cs]=gdb
+Name[csb]=gdb
+Name[da]=gdb
+Name[de]=gdb
+Name[el]=gdb
+Name[en_GB]=gdb
+Name[eo]=gdb
+Name[es]=gdb
+Name[et]=gdb
+Name[eu]=gdb
+Name[fa]=gdb
+Name[fi]=gdb
+Name[fr]=gdb
+Name[fy]=gdb
+Name[ga]=gdb
+Name[gl]=gdb
+Name[gu]=gdb
+Name[he]=gdb
+Name[hi]=gdb
+Name[hr]=gdb
+Name[hu]=gdb
+Name[ia]=gdb
+Name[id]=gdb
+Name[is]=gdb
+Name[it]=gdb
+Name[ja]=gdb
+Name[ka]=gdb
+Name[kk]=gdb
+Name[km]=gdb
+Name[kn]=gdb
+Name[ko]=gdb
+Name[lt]=gdb
+Name[lv]=gdb
+Name[mai]=gdb
+Name[mk]=gdb
+Name[ml]=ജിഡിബി
+Name[mr]=gdb
+Name[nb]=gdb
+Name[nds]=gdb
+Name[nl]=gdb
+Name[nn]=gdb
+Name[pa]=gdb
+Name[pl]=gdb
+Name[pt]=gdb
+Name[pt_BR]=gdb
+Name[ro]=gdb
+Name[ru]=gdb
+Name[si]=gdb
+Name[sk]=gdb
+Name[sl]=gdb
+Name[sr]=ГДБ
+Name[sr@ijekavian]=ГДБ
+Name[sr@ijekavianlatin]=GDB
+Name[sr@latin]=GDB
+Name[sv]=gdb
+Name[tg]=gdb
+Name[th]=gdb
+Name[tr]=gdb
+Name[ug]=gdb
+Name[uk]=gdb
+Name[vi]=gdb
+Name[wa]=gdb
+Name[x-test]=xxgdbxx
+Name[zh_CN]=gdb
+Name[zh_TW]=gdb
+TryExec=gdb
+Backends=KCrash
+
+[KCrash]
+Exec=gdb -nw -n -batch -x %tempfile -p %pid %execpath
+BatchCommands=set width 200\nthread\nthread apply all bt
diff --git a/drkonqi/data/debuggers/internal/kdbgwinrc b/drkonqi/data/debuggers/internal/kdbgwinrc
new file mode 100644
index 00000000..1b30c94a
--- /dev/null
+++ b/drkonqi/data/debuggers/internal/kdbgwinrc
@@ -0,0 +1,75 @@
+[General]
+Name=kdbgwin
+Name[ar]=kdbgwin
+Name[ast]=kdbgwin
+Name[bg]=kdbgwin
+Name[bn]=kdbgwin
+Name[bs]=Kdbgwin
+Name[ca]=kdbgwin
+Name[ca@valencia]=kdbgwin
+Name[cs]=kdbgwin
+Name[da]=kdbgwin
+Name[de]=kdbgwin
+Name[el]=kdbgwin
+Name[en_GB]=kdbgwin
+Name[eo]=kdbgwin
+Name[es]=kdbgwin
+Name[et]=kdbgwin
+Name[eu]=kdbgwin
+Name[fa]=kdbgwin
+Name[fi]=kdbgwin
+Name[fr]=kdbgwin
+Name[ga]=kdbgwin
+Name[gl]=kdbgwin
+Name[gu]=kdbgwin
+Name[he]=kdbgwin
+Name[hi]=kdbgwin
+Name[hr]=kdbgwin
+Name[hu]=kdbgwin
+Name[ia]=kdbgwin
+Name[id]=kdbgwin
+Name[is]=kdbgwin
+Name[it]=kdbgwin
+Name[ja]=kdbgwin
+Name[ka]=kdbgwin
+Name[kk]=kdbgwin
+Name[km]=kdbgwin
+Name[kn]=kdbgwin
+Name[ko]=kdbgwin
+Name[lt]=kdbgwin
+Name[lv]=kdbgwin
+Name[mai]=kdbgwin
+Name[mr]=kdbgwin
+Name[nb]=kdbgwin
+Name[nds]=kdbgwin
+Name[nl]=kdbgwin
+Name[nn]=kdbgwin
+Name[pa]=kdbgwin
+Name[pl]=kdbgwin
+Name[pt]=kdbgwin
+Name[pt_BR]=kdbgwin
+Name[ro]=kdbgwin
+Name[ru]=kdbgwin
+Name[si]=kdbgwin
+Name[sk]=kdbgwin
+Name[sl]=kdbgwin
+Name[sr]=Кдбг‑вин
+Name[sr@ijekavian]=Кдбг‑вин
+Name[sr@ijekavianlatin]=KDbgWin
+Name[sr@latin]=KDbgWin
+Name[sv]=kdbgwin
+Name[tg]=kdbgwin
+Name[th]=kdbgwin
+Name[tr]=kdbgwin
+Name[ug]=kdbgwin
+Name[uk]=kdbgwin
+Name[vi]=kdbgwin
+Name[wa]=kdbgwin
+Name[x-test]=xxkdbgwinxx
+Name[zh_CN]=kdbgwin
+Name[zh_TW]=kdbgwin
+TryExec=kdbgwin
+Backends=KCrash
+
+[KCrash]
+Exec=kdbgwin %pid %thread
diff --git a/drkonqi/data/mappings b/drkonqi/data/mappings
new file mode 100644
index 00000000..782e3036
--- /dev/null
+++ b/drkonqi/data/mappings
@@ -0,0 +1,286 @@
+#---
+#Binary name -> Bugzilla product|component mapping
+#---
+
+[Mappings]
+
+#KDE Platform (kdelibs)
+kdebugdialog=kdelibs|general
+kdeinit4=kdelibs|general
+kdepasswd=kdelibs|kpasswdserver
+kdialog=kdelibs|general
+keditfiletype=kdelibs|general
+kfmclient=kdelibs|general
+kglobalaccel=kdelibs|general
+kiconfinder=kdelibs|general
+kuiserver=kdelibs|general
+kded4=kdelibs|kded
+kcmshell4=systemsettings|general
+kwalletd=kdelibs|kwallet
+kwrited=konsole|kwrited
+kbuildsycoca4=kdelibs|ksycoca
+knotify4=kdelibs|knotify
+kcminit=kde|general
+
+#KDE Platform (KIO)
+kioclient=kio|general
+ktrash=kio|trash
+
+#KDE Platform (Solid)
+solid-action-desktop-gen=solid|general
+bluedevil-audio=solid|bluetooth
+bluedevil-helper=solid|bluetooth
+bluedevil-input=solid|bluetooth
+bluedevil-monolithic=solid|bluetooth
+bluedevil-network-dun=solid|bluetooth
+bluedevil-network-panu=solid|bluetooth
+bluedevil-sendfile=solid|bluetooth
+bluedevil-wizard=solid|bluetooth
+
+#KDE Platform (Nepomuk)
+nepomukbackup=nepomuk|backupservice
+nepomukcleaner=nepomuk|general
+nepomukcontroller=nepomuk|controller
+nepomukindexer=nepomuk|fileindexer
+nepomukfileindexer=nepomuk|fileindexer
+nepomukfilewatch=nepomuk|filewatch
+nepomukstorage=nepomuk|storage
+nepomukserver=nepomuk|general
+nepomukservicestub=nepomuk|general
+nepomukshell=nepomukshell|Misc
+metadataextractor=nepomuk|general
+
+#KDE Plasma Desktop (Plasma & KRunner)
+plasma-desktop=plasma|general
+plasma-mid=plasma|general
+plasma-overlay=plasma|general
+plasma2jolie=plasma|general
+plasmagik=plasma|general
+plasmapkg=plasma|general
+knotificationareaitemtest=plasma|widget-systemtray
+knotificationicontest=plasma|widget-systemtray
+lancelot=plasma|widget-lancelot
+plasma-netbook=plasma|plasma-netbook
+kactivitymanagerd=kactivities|general
+plasma-windowed=plasma|general
+plasma-device=Active|General
+
+#KDE Plasma SDK (Plasmate)
+plasmaengineexplorer=plasmate|general
+plasmawallpaperviewer=plasmate|general
+plasmoidviewer=plasmate|general
+
+#KDE Plasma Desktop (KWin)
+kwin_gles=kwin|general
+kwinactive=kwin|general
+kwinactive_gles=kwin|general
+
+#KDE Kontact (Akonadi)
+akonadi_archivemail_agent=Akonadi|Archive Mail Agent
+akonadi_benchmarker=Akonadi|general
+akonadi_birthdays_resource=Akonadi|general
+akonadi_contacts_resource=Akonadi|Contacts resource
+akonadi_control=Akonadi|general
+akonadi_davgroupware_resource=Akonadi|DAV Resource
+akonadi_distlist_resource=Akonadi|general
+akonadi_facebook_resource=Akonadi|Facebook Resource
+akonadi_gcal_resource=Akonadi|Google Resource
+akonadi_googledata_resource=Akonadi|GoogleData Resource
+akonadi_googlecalendar_resource=Akonadi|Google Resource
+akonadi_googlecontacts_resource=Akonadi|Google Resource
+akonadi_ical_resource=Akonadi|ICal file resource
+akonadi_imap_resource=Akonadi|IMAP resource
+akonadi_kabc_resource=Akonadi|KResource compat Bridges
+akonadi_kcal_resource=Akonadi|KResource compat Bridges
+akonadi_knut_resource=Akonadi|Knut resource
+akonadi_kolabproxy_resource=Akonadi|Kolab resource
+akonadi_localbookmarks_resource=Akonadi|Local Bookmark Resource
+akonadi_maildir_resource=Akonadi|Maildir Resource
+akonadi_maildispatcher_agent=Akonadi|Mail Dispatcher Agent
+akonadi_mailfilter_agent=Akonadi|Mail Filter Agent
+akonadi_mailthreader_agent=Akonadi|general
+akonadi_mixedmaildir_resource=Akonadi|Mixed Maildir resource
+akonadi_nepomuk_feeder=Akonadi|Nepomuk Feeder Agents
+akonadi_nepomuk_calendar_feeder=Akonadi|Nepomuk Feeder Agents
+akonadi_nepomuk_contact_feeder=Akonadi|Nepomuk Feeder Agents
+akonadi_nepomuk_email_feeder=Akonadi|Nepomuk Feeder Agents
+akonadi_nepomuktag_resource=Akonadi|Nepomuk Feeder Agents
+akonadi_nntp_resource=Akonadi|general
+akonadi_pop3_resource=Akonadi|POP3 Resource
+akonadi_strigi_feeder=Akonadi|general
+akonadi_sendlater_agent=Akonadi|SendLaterAgent
+akonadi_vcard_resource=Akonadi|VCard file resource
+akonadi_vcarddir_resource=Akonadi|VCard dir resource
+akonadiconsole=Akonadi|akonadiconsole
+akonadictl=Akonadi|general
+akonadiserver=Akonadi|server
+akonaditest=Akonadi|general
+akonaditray=Akonadi|general
+accountwizard=Akonadi|Account Wizard
+kres-migrator=Akonadi|Migration
+akonadi_openxchange_resource=Akonadi|OpenXchange Resource
+akonadi_newmailnotifier_agent=Akonadi|New Mail Notifier
+
+#KDE Kontact (PIM)
+importwizard=kdepim|importwizard
+kalarmautostart=kalarm|general
+kpilotDaemon=kpilot|kpilotDaemon
+korgac=korgac|general
+kmail=kmail2|general
+kmail-migrator=kmail2|general
+kaddressbook-mobile=KDE PIM Mobile|general
+backupmail=kdepim|backupmail
+
+
+#KDE Konqueror
+kjscmd=konqueror|kjs
+nspluginscan=konqueror|nsplugins
+nspluginviewer=konqueror|nspluginviewer
+
+# KDE Telepathy
+ktp-contactlist=telepathy|contactlist
+ktp-send-file=telepathy|send-file
+ktp-text-ui=telepathy|text-ui
+ktp-call-ui=telepathy|call-ui
+ktp-filetransfer-handler=telepathy|filetransfer-handler
+ktp-auth-handler=telepathy|auth-handler
+ktp-log-viewer=telepathy|log-viewer
+
+# KDE Calligra Suite
+braindump=braindump|application
+kritagemini=krita|general
+kritasketch=krita|krita sketch
+
+
+# KDE Kipi-plugins
+dngconverter=kipiplugins|DngConverter
+expoblending=kipiplugins|ExpoBlending
+panoramagui=kipiplugins|Panorama
+photolayoutseditor=kipiplugins|PhotoLayoutsEditor
+scangui=kipiplugins|AcquireImages
+
+
+# Gluon
+gluoncreator=gluon|gluoncreator
+gluon_kdeplayer=gluon|gluonplayer
+gluon_kdeextplayer=gluon|gluonplayer
+
+#Other KDE Applications and Technologies
+kmixctrl=kmix|general
+kwrite=kate|kwrite
+dragon=dragonplayer|general
+kaccess=systemsettings|kcm_accessibility
+kfontinst=systemsettings|kcm_fontinst
+kfontview=systemsettings|kcm_fontinst
+polkit-kde-manager=policykit-kde|manager
+polkit-kde-authentication-agent-1=policykit-kde|polkit-kde-authentication-agent-1
+kepastray=kepas|general
+apper-sentinel=apper|general
+muon=muon|muon
+muon-discover=muon|discover
+muon-installer=muon|installer
+muon-updater=muon|updater
+printer-applet-kde=printer-applet|general
+kde-add-printer=print-manager|general
+kde-print-queue=print-manager|general
+partitionmanager-bin=partitionmanager|general
+krandrtray=krandr|krandrtray
+kmymoney=kmymoney4|general
+kdevdesigner=kdevelop|Qt Designer Integration
+kdevelop.bin=kdevelop|general
+kscreenlocker=kscreensaver|locker
+gwenview_importer=gwenview|importer
+kdmgreet=kdm|general
+kaffeine-xbu=kaffeine|general
+networkmanagement_configshell=Network Management|general
+krcdnotifieritem=kremotecontrol|tray
+khipu=khipu|core
+mangonel=Mangonel|mangonel
+kde-nm-connection-editor=plasma-nm|editor
+pairseditor=pairs|editor
+
+kwatchgnupg=kleopatra|general
+homerunviewer=homerun|general
+
+ksecretsync=ksecretservice|ksecretsync
+cvsservice=cervisia|general
+
+
+# applicaitons not using bugs.kde.org
+aku=unknown|general
+compiz=unknown|general
+firefox=unknown|general
+firefox-bin=unknown|general
+iqfile=unknown|general
+kanyremote=unknown|general
+kde4-window-decorator=unknown|general
+kdesudo=unknown|general
+kdialogd4=unknown|general
+kguitar=unknown|general
+klog=unknown|general
+klog-bin=unknown|general
+kmozillahelper=unknown|general
+konstructor=unknown|general
+kraft=unknown|general
+kuroo=unknown|general
+kvirc=unknown|general
+loopy=unknown|general
+leechcraft=unknown|general
+nateon=unknown|general
+opera=unknown|general
+pcSoftwareManager=unknown|general
+qutim=unknown|general
+semantik=unknown|general
+squeeze=unknown|general
+subtitlecomposer=unknown|general
+synaptiks=unknown|general
+shaman=unknown|general
+tribe=unknown|general
+xulrunner-stub=unknown|general
+
+#---
+#This section relates a product groupt to a product
+#---
+
+[ProductGroup]
+kontact=kdepim-base|kdepim-apps
+korganizer=kdepim-base
+kaddressbook=kdepim-base
+akregator=kdepim-base
+kmail=kdepim-base
+KMail 2=kdepim-base
+Akonadi=kdepim-base
+kword=koffice
+koshell=koffice
+kdevelop=kdevelop
+kdevdesigner=kdevelop
+plasma=kdebindings
+amarok=multimedia
+digikam=imaging
+gwenview=imaging
+kaffeine=multimedia
+juk=multimedia
+knetworkmanager=networkmanager
+Skanlite=scanner
+konqueror=filemanagement
+kcells=koffice
+kplato=calligraplan
+kpresenter=calligrastage
+kspread=calligratables
+
+#---
+#This section describes several bugzilla products groups.
+#---
+
+[BZGroups]
+kdeplatform=kde|kdelibs|kio|kfile|Oxygen|solid|Phonon|Akonadi
+kdepim-base=kontact|kdepimlibs|kdepim|kresources|konqueror
+kdepim-apps=kontact|korganizer|kaddressbook|akregator|kmail
+koffice=koffice|koshell|kspread|kword|krita|karbon|kchart|kplato|kpresenter
+kdevelop=kdevelop|kdevplatform
+kdebindings=bindings
+multimedia=kdemultimedia|taglib
+imaging=digikam|digikamimageplugins|kipiplugins
+networkmanager=knetworkmanager|Network Management|solid
+scanner=libksane
+filemanagement=konqueror|dolphin|nepomuk
diff --git a/drkonqi/debugger.cpp b/drkonqi/debugger.cpp
new file mode 100644
index 00000000..26ca3389
--- /dev/null
+++ b/drkonqi/debugger.cpp
@@ -0,0 +1,147 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#include "debugger.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "crashedapplication.h"
+#include "drkonqi.h"
+
+//static
+QList Debugger::availableInternalDebuggers(const QString & backend)
+{
+ return availableDebuggers("debuggers/internal/*", backend);
+}
+
+//static
+QList Debugger::availableExternalDebuggers(const QString & backend)
+{
+ return availableDebuggers("debuggers/external/*", backend);
+}
+
+bool Debugger::isValid() const
+{
+ return !m_config.isNull();
+}
+
+bool Debugger::isInstalled() const
+{
+ QString tryexec = tryExec();
+ return !tryexec.isEmpty() && !KStandardDirs::findExe(tryexec).isEmpty();
+}
+
+QString Debugger::name() const
+{
+ return isValid() ? m_config->group("General").readEntry("Name") : QString();
+}
+
+QString Debugger::codeName() const
+{
+ //fall back to the "TryExec" string if "CodeName" is not specified.
+ //for most debuggers those strings should be the same
+ return isValid() ? m_config->group("General").readEntry("CodeName", tryExec()) : QString();
+}
+
+QString Debugger::tryExec() const
+{
+ return isValid() ? m_config->group("General").readEntry("TryExec") : QString();
+}
+
+QStringList Debugger::supportedBackends() const
+{
+ return isValid() ? m_config->group("General").readEntry("Backends")
+ .split('|', QString::SkipEmptyParts) : QStringList();
+}
+
+void Debugger::setUsedBackend(const QString & backendName)
+{
+ if (supportedBackends().contains(backendName)) {
+ m_backend = backendName;
+ }
+}
+
+QString Debugger::command() const
+{
+ if (!isValid() || !m_config->hasGroup(m_backend)) {
+ return QString();
+ } else {
+ return m_config->group(m_backend).readPathEntry("Exec", QString());
+ }
+}
+
+QString Debugger::backtraceBatchCommands() const
+{
+ if (!isValid() || !m_config->hasGroup(m_backend)) {
+ return QString();
+ } else {
+ return m_config->group(m_backend).readEntry("BatchCommands");
+ }
+}
+
+bool Debugger::runInTerminal() const
+{
+ if (!isValid() || !m_config->hasGroup(m_backend)) {
+ return false;
+ } else {
+ return m_config->group(m_backend).readEntry("Terminal", false);
+ }
+}
+
+//static
+void Debugger::expandString(QString & str, ExpandStringUsage usage, const QString & tempFile)
+{
+ const CrashedApplication *appInfo = DrKonqi::crashedApplication();
+ QHash map;
+ map[QLatin1String("progname")] = appInfo->name();
+ map[QLatin1String("execname")] = appInfo->fakeExecutableBaseName();
+ map[QLatin1String("execpath")] = appInfo->executable().absoluteFilePath();
+ map[QLatin1String("signum")] = QString::number(appInfo->signalNumber());
+ map[QLatin1String("signame")] = appInfo->signalName();
+ map[QLatin1String("pid")] = QString::number(appInfo->pid());
+ map[QLatin1String("tempfile")] = tempFile;
+ map[QLatin1String("thread")] = QString::number(appInfo->thread());
+
+ if (usage == ExpansionUsageShell) {
+ str = KMacroExpander::expandMacrosShellQuote(str, map);
+ } else {
+ str = KMacroExpander::expandMacros(str, map);
+ }
+}
+
+//static
+QList Debugger::availableDebuggers(const char *regexp, const QString & backend)
+{
+ KStandardDirs *dirs = KGlobal::dirs();
+ QStringList debuggers = dirs->findAllResources("appdata", QLatin1String(regexp),
+ KStandardDirs::NoDuplicates);
+
+ QList result;
+ foreach (const QString & debuggerFile, debuggers) {
+ Debugger debugger;
+ debugger.m_config = KSharedConfig::openConfig(debuggerFile);
+ if (debugger.supportedBackends().contains(backend)) {
+ debugger.setUsedBackend(backend);
+ result.append(debugger);
+ }
+ }
+ return result;
+}
diff --git a/drkonqi/debugger.h b/drkonqi/debugger.h
new file mode 100644
index 00000000..1451397e
--- /dev/null
+++ b/drkonqi/debugger.h
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef DEBUGGER_H
+#define DEBUGGER_H
+
+#include
+
+#include
+
+class Debugger
+{
+public:
+ static QList availableInternalDebuggers(const QString & backend);
+ static QList availableExternalDebuggers(const QString & backend);
+
+ /** Returns true if this Debugger instance is valid, or false otherwise.
+ * Debugger instances are valid only if they have been constructed from
+ * availableInternalDebuggers() or availableExternalDebuggers(). If they
+ * have been constructed directly using the Debugger constructor, they are invalid.
+ */
+ bool isValid() const;
+
+ /** Returns true if this debugger is installed. This is determined by
+ * looking for the executable that tryExec() returns. If it is in $PATH,
+ * this method returns true.
+ */
+ bool isInstalled() const;
+
+ /** Returns the translatable name of the debugger (eg. "GDB") */
+ QString name() const;
+
+ /** Returns the code name of the debugger (eg. "gdb"). */
+ QString codeName() const;
+
+ /** Returns the executable name that drkonqi should check if it exists
+ * to determine whether the debugger is installed
+ */
+ QString tryExec() const;
+
+ /** Returns a list with the drkonqi backends that this debugger supports */
+ QStringList supportedBackends() const;
+
+ /** Sets the backend to be used. This function must be called before using
+ * command(), backtraceBatchCommands() or runInTerminal().
+ */
+ void setUsedBackend(const QString & backendName);
+
+ /** Returns the command that should be run to use the debugger */
+ QString command() const;
+
+ /** Returns the commands that should be given to the debugger when
+ * run in batch mode in order to generate a backtrace
+ */
+ QString backtraceBatchCommands() const;
+
+ /** If this is an external debugger, it returns whether it should be run in a terminal or not */
+ bool runInTerminal() const;
+
+
+ enum ExpandStringUsage {
+ ExpansionUsagePlainText,
+ ExpansionUsageShell
+ };
+
+ static void expandString(QString & str, ExpandStringUsage usage = ExpansionUsagePlainText,
+ const QString & tempFile = QString());
+
+private:
+ static QList availableDebuggers(const char *regexp, const QString & backend);
+ KSharedConfig::Ptr m_config;
+ QString m_backend;
+};
+
+#endif
diff --git a/drkonqi/debuggerlaunchers.cpp b/drkonqi/debuggerlaunchers.cpp
new file mode 100644
index 00000000..6bdb52d3
--- /dev/null
+++ b/drkonqi/debuggerlaunchers.cpp
@@ -0,0 +1,117 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#include "debuggerlaunchers.h"
+
+#include
+
+#include
+#include
+#include
+
+#include "detachedprocessmonitor.h"
+#include "drkonqi.h"
+#include "crashedapplication.h"
+
+DefaultDebuggerLauncher::DefaultDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent)
+ : AbstractDebuggerLauncher(parent), m_debugger(debugger)
+{
+ m_monitor = new DetachedProcessMonitor(this);
+ connect(m_monitor, SIGNAL(processFinished()), SLOT(onProcessFinished()));
+}
+
+QString DefaultDebuggerLauncher::name() const
+{
+ return m_debugger.name();
+}
+
+void DefaultDebuggerLauncher::start()
+{
+ if ( qobject_cast(parent())->debuggerIsRunning() ) {
+ kWarning() << "Another debugger is already running";
+ return;
+ }
+
+ QString str = m_debugger.command();
+ Debugger::expandString(str, Debugger::ExpansionUsageShell);
+
+ emit starting();
+ int pid = KProcess::startDetached(KShell::splitArgs(str));
+ if ( pid > 0 ) {
+ m_monitor->startMonitoring(pid);
+ } else {
+ kError() << "Could not start debugger:" << name();
+ emit finished();
+ }
+}
+
+void DefaultDebuggerLauncher::onProcessFinished()
+{
+ emit finished();
+}
+
+#if 0
+TerminalDebuggerLauncher::TerminalDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent)
+ : DefaultDebuggerLauncher(debugger, parent)
+{
+}
+
+void TerminalDebuggerLauncher::start()
+{
+ DefaultDebuggerLauncher::start(); //FIXME
+}
+#endif
+
+
+DBusOldInterfaceLauncher::DBusOldInterfaceLauncher(DebuggerManager *parent)
+ : AbstractDebuggerLauncher(parent)
+{
+ m_adaptor = new DBusOldInterfaceAdaptor(this);
+ QDBusConnection::sessionBus().registerObject("/krashinfo", this);
+}
+
+QString DBusOldInterfaceLauncher::name() const
+{
+ return m_name;
+}
+
+void DBusOldInterfaceLauncher::start()
+{
+ emit starting();
+ emit m_adaptor->acceptDebuggingApplication();
+}
+
+
+DBusOldInterfaceAdaptor::DBusOldInterfaceAdaptor(DBusOldInterfaceLauncher *parent)
+ : QDBusAbstractAdaptor(parent)
+{
+ Q_ASSERT(parent);
+}
+
+int DBusOldInterfaceAdaptor::pid()
+{
+ return DrKonqi::crashedApplication()->pid();
+}
+
+void DBusOldInterfaceAdaptor::registerDebuggingApplication(const QString & name)
+{
+ if ( static_cast(parent())->m_name.isEmpty() && !name.isEmpty() ) {
+ static_cast(parent())->m_name = name;
+ emit static_cast(parent())->available();
+ }
+}
+
+#include "debuggerlaunchers.moc"
diff --git a/drkonqi/debuggerlaunchers.h b/drkonqi/debuggerlaunchers.h
new file mode 100644
index 00000000..ad6e3d59
--- /dev/null
+++ b/drkonqi/debuggerlaunchers.h
@@ -0,0 +1,112 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef DEBUGGERLAUNCHERS_H
+#define DEBUGGERLAUNCHERS_H
+
+#include
+
+#include "debugger.h"
+#include "debuggermanager.h"
+
+class DetachedProcessMonitor;
+
+class AbstractDebuggerLauncher : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name)
+public:
+ explicit AbstractDebuggerLauncher(DebuggerManager *parent = 0) : QObject(parent) {}
+ virtual QString name() const = 0;
+
+public slots:
+ virtual void start() = 0;
+
+signals:
+ void starting();
+ void finished();
+ void invalidated();
+};
+
+class DefaultDebuggerLauncher : public AbstractDebuggerLauncher
+{
+ Q_OBJECT
+public:
+ explicit DefaultDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent = 0);
+ virtual QString name() const;
+
+public slots:
+ virtual void start();
+
+private slots:
+ void onProcessFinished();
+
+private:
+ const Debugger m_debugger;
+ DetachedProcessMonitor *m_monitor;
+};
+
+#if 0
+class TerminalDebuggerLauncher : public DefaultDebuggerLauncher
+{
+ Q_OBJECT
+public:
+ explicit TerminalDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent = 0);
+
+public slots:
+ virtual void start();
+};
+#endif
+
+class DBusOldInterfaceAdaptor;
+
+/** This class handles the old drkonqi dbus interface used by kdevelop */
+class DBusOldInterfaceLauncher : public AbstractDebuggerLauncher
+{
+ Q_OBJECT
+ friend class DBusOldInterfaceAdaptor;
+public:
+ explicit DBusOldInterfaceLauncher(DebuggerManager *parent = 0);
+ virtual QString name() const;
+
+public slots:
+ virtual void start();
+
+signals:
+ void available();
+
+private:
+ QString m_name;
+ DBusOldInterfaceAdaptor *m_adaptor;
+};
+
+class DBusOldInterfaceAdaptor : public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.Krash")
+ friend class DBusOldInterfaceLauncher;
+public:
+ explicit DBusOldInterfaceAdaptor(DBusOldInterfaceLauncher *parent);
+
+public slots:
+ int pid();
+ Q_NOREPLY void registerDebuggingApplication(const QString & name);
+
+signals:
+ void acceptDebuggingApplication();
+};
+
+#endif // DEBUGGERLAUNCHERS_H
diff --git a/drkonqi/debuggermanager.cpp b/drkonqi/debuggermanager.cpp
new file mode 100644
index 00000000..11cd4dbe
--- /dev/null
+++ b/drkonqi/debuggermanager.cpp
@@ -0,0 +1,139 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#include "debuggermanager.h"
+
+#include
+#include
+
+#include "debugger.h"
+#include "debuggerlaunchers.h"
+#include "backtracegenerator.h"
+
+struct DebuggerManager::Private
+{
+ BacktraceGenerator *btGenerator;
+ bool debuggerRunning;
+ QList externalDebuggers;
+ DBusOldInterfaceLauncher *dbusOldInterfaceLauncher;
+};
+
+DebuggerManager::DebuggerManager(const Debugger & internalDebugger,
+ const QList & externalDebuggers,
+ QObject *parent)
+ : QObject(parent), d(new Private)
+{
+ d->debuggerRunning = false;
+ d->btGenerator = new BacktraceGenerator(internalDebugger, this);
+ connect(d->btGenerator, SIGNAL(starting()), SLOT(onDebuggerStarting()));
+ connect(d->btGenerator, SIGNAL(done()), SLOT(onDebuggerFinished()));
+ connect(d->btGenerator, SIGNAL(someError()), SLOT(onDebuggerFinished()));
+ connect(d->btGenerator, SIGNAL(failedToStart()), SLOT(onDebuggerFinished()));
+
+ foreach(const Debugger & debugger, externalDebuggers) {
+ if (debugger.isInstalled()) {
+ AbstractDebuggerLauncher *l = new DefaultDebuggerLauncher(debugger, this); //FIXME
+ d->externalDebuggers.append(l);
+ connect(l, SIGNAL(starting()), SLOT(onDebuggerStarting()));
+ connect(l, SIGNAL(finished()), SLOT(onDebuggerFinished()));
+ connect(l, SIGNAL(invalidated()), SLOT(onDebuggerInvalidated()));
+ }
+ }
+
+ //setup kdevelop compatibility
+ d->dbusOldInterfaceLauncher = new DBusOldInterfaceLauncher(this);
+ connect(d->dbusOldInterfaceLauncher, SIGNAL(starting()), SLOT(onDebuggerStarting()));
+ connect(d->dbusOldInterfaceLauncher, SIGNAL(available()), SLOT(onDBusOldInterfaceDebuggerAvailable()));
+}
+
+DebuggerManager::~DebuggerManager()
+{
+ if (d->btGenerator->state() == BacktraceGenerator::Loading) {
+ //if the debugger is running, kill it and continue the process.
+ delete d->btGenerator;
+ onDebuggerFinished();
+ }
+
+ delete d;
+}
+
+bool DebuggerManager::debuggerIsRunning() const
+{
+ return d->debuggerRunning;
+}
+
+bool DebuggerManager::showExternalDebuggers() const
+{
+ KConfigGroup config(KGlobal::config(), "DrKonqi");
+ bool showDebugger = config.readEntry("ShowDebugButton", false);
+
+ // TODO: remove all these compatibility code when KDE SC 4.11
+ // is considered as totally outdated
+ //
+ //for compatibility with drkonqi 1.0, if "ShowDebugButton" is not specified in the config
+ //and the old "ConfigName" key exists and is set to "developer", we show the debug button.
+ if (!config.hasKey("ShowDebugButton") &&
+ config.readEntry("ConfigName") == "developer") {
+ showDebugger = true;
+ // migrate and remove the long deprecated entry
+ config.writeEntry("ShowDebugButton", true);
+ config.deleteEntry("ConfigName");
+ }
+
+ return showDebugger;
+}
+
+QList DebuggerManager::availableExternalDebuggers() const
+{
+ return d->externalDebuggers;
+}
+
+BacktraceGenerator* DebuggerManager::backtraceGenerator() const
+{
+ return d->btGenerator;
+}
+
+void DebuggerManager::onDebuggerStarting()
+{
+ d->debuggerRunning = true;
+ emit debuggerStarting();
+ emit debuggerRunning(true);
+}
+
+void DebuggerManager::onDebuggerFinished()
+{
+ d->debuggerRunning = false;
+ emit debuggerFinished();
+ emit debuggerRunning(false);
+}
+
+void DebuggerManager::onDebuggerInvalidated()
+{
+ AbstractDebuggerLauncher *launcher = qobject_cast(sender());
+ Q_ASSERT(launcher);
+ int index = d->externalDebuggers.indexOf(launcher);
+ Q_ASSERT(index >= 0);
+ d->externalDebuggers.removeAt(index);
+ emit externalDebuggerRemoved(launcher);
+}
+
+void DebuggerManager::onDBusOldInterfaceDebuggerAvailable()
+{
+ d->externalDebuggers.append(d->dbusOldInterfaceLauncher);
+ emit externalDebuggerAdded(d->dbusOldInterfaceLauncher);
+}
+
+#include "debuggermanager.moc"
diff --git a/drkonqi/debuggermanager.h b/drkonqi/debuggermanager.h
new file mode 100644
index 00000000..49f5c4df
--- /dev/null
+++ b/drkonqi/debuggermanager.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef DEBUGGERMANAGER_H
+#define DEBUGGERMANAGER_H
+
+#include
+
+class BacktraceGenerator;
+class Debugger;
+class AbstractDebuggerLauncher;
+
+class DebuggerManager : public QObject
+{
+ Q_OBJECT
+public:
+ DebuggerManager(const Debugger & internalDebugger,
+ const QList & externalDebuggers,
+ QObject *parent = 0);
+ virtual ~DebuggerManager();
+
+ bool debuggerIsRunning() const;
+ bool showExternalDebuggers() const;
+ QList availableExternalDebuggers() const;
+ BacktraceGenerator *backtraceGenerator() const;
+
+signals:
+ void debuggerStarting();
+ void debuggerFinished();
+ void debuggerRunning(bool running);
+ void externalDebuggerAdded(AbstractDebuggerLauncher *launcher);
+ void externalDebuggerRemoved(AbstractDebuggerLauncher *launcher);
+
+private slots:
+ void onDebuggerStarting();
+ void onDebuggerFinished();
+ void onDebuggerInvalidated();
+ void onDBusOldInterfaceDebuggerAvailable();
+
+private:
+ struct Private;
+ Private *const d;
+};
+
+#endif // DEBUGGERMANAGER_H
diff --git a/drkonqi/debugpackageinstaller.cpp b/drkonqi/debugpackageinstaller.cpp
new file mode 100644
index 00000000..86429343
--- /dev/null
+++ b/drkonqi/debugpackageinstaller.cpp
@@ -0,0 +1,128 @@
+/*******************************************************************
+* debugpackageinstaller.cpp
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#include
+
+#include "debugpackageinstaller.h"
+
+#include
+#include
+#include
+#include
+#include
+
+#include "drkonqi.h"
+#include "crashedapplication.h"
+
+DebugPackageInstaller::DebugPackageInstaller(QObject *parent)
+ : QObject(parent), m_installerProcess(0), m_progressDialog(0)
+{
+ m_executablePath = KStandardDirs::findExe(DEBUG_PACKAGE_INSTALLER_NAME); //defined from CMakeLists.txt
+}
+
+bool DebugPackageInstaller::canInstallDebugPackages() const
+{
+ return !m_executablePath.isEmpty();
+}
+
+void DebugPackageInstaller::setMissingLibraries(const QStringList & libraries)
+{
+ m_missingLibraries = libraries;
+}
+
+void DebugPackageInstaller::installDebugPackages()
+{
+ Q_ASSERT(canInstallDebugPackages());
+
+ if (!m_installerProcess) {
+ //Run process
+ m_installerProcess = new KProcess(this);
+ connect(m_installerProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
+ this, SLOT(processFinished(int,QProcess::ExitStatus)));
+
+ *m_installerProcess << m_executablePath
+ << DrKonqi::crashedApplication()->executable().absoluteFilePath()
+ << m_missingLibraries;
+ m_installerProcess->start();
+
+ //Show dialog
+ m_progressDialog = new KProgressDialog(qobject_cast(parent()));
+ connect(m_progressDialog, SIGNAL(cancelClicked()), this, SLOT(progressDialogCanceled()));
+ m_progressDialog->progressBar()->setRange(0,0);
+ m_progressDialog->setWindowTitle(i18nc("@title:window", "Missing debug symbols"));
+ m_progressDialog->setLabelText(i18nc("@info:progress", "Requesting installation of missing "
+ "debug symbols packages..."));
+ m_progressDialog->show();
+ }
+}
+
+void DebugPackageInstaller::progressDialogCanceled()
+{
+ m_progressDialog->deleteLater();
+ m_progressDialog = 0;
+
+ if (m_installerProcess) {
+ if (m_installerProcess->state() == QProcess::Running) {
+ disconnect(m_installerProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
+ this, SLOT(processFinished(int,QProcess::ExitStatus)));
+ m_installerProcess->kill();
+ disconnect(m_installerProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
+ m_installerProcess, SLOT(deleteLater()));
+ }
+ m_installerProcess = 0;
+ }
+
+ emit canceled();
+}
+
+void DebugPackageInstaller::processFinished(int exitCode, QProcess::ExitStatus)
+{
+ switch(exitCode) {
+ case ResultInstalled:
+ {
+ emit packagesInstalled();
+ break;
+ }
+ case ResultSymbolsNotFound:
+ {
+ emit error(i18nc("@info", "Could not find debug symbol packages for this application."));
+ break;
+ }
+ case ResultCanceled:
+ {
+ emit canceled();
+ break;
+ }
+ case ResultError:
+ default:
+ {
+ emit error(i18nc("@info", "An error was encountered during the installation "
+ "of the debug symbol packages."));
+ break;
+ }
+ }
+
+ m_progressDialog->reject();
+
+ delete m_progressDialog;
+ m_progressDialog = 0;
+
+ delete m_installerProcess;
+ m_installerProcess = 0;
+}
diff --git a/drkonqi/debugpackageinstaller.h b/drkonqi/debugpackageinstaller.h
new file mode 100644
index 00000000..d1cdbc08
--- /dev/null
+++ b/drkonqi/debugpackageinstaller.h
@@ -0,0 +1,57 @@
+/*******************************************************************
+* debugpackageinstaller.h
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+#ifndef DEBUGPACKAGEINSTALLER__H
+#define DEBUGPACKAGEINSTALLER__H
+
+#include
+#include
+
+class KProcess;
+class KProgressDialog;
+
+class DebugPackageInstaller: public QObject
+{
+ Q_OBJECT
+
+ enum Results { ResultInstalled = 0, ResultError = 1,
+ ResultSymbolsNotFound = 2, ResultCanceled = 3 };
+
+ public:
+ explicit DebugPackageInstaller(QObject *parent = 0);
+ bool canInstallDebugPackages() const;
+ void setMissingLibraries(const QStringList &);
+ void installDebugPackages();
+
+ private Q_SLOTS:
+ void processFinished(int, QProcess::ExitStatus);
+ void progressDialogCanceled();
+
+ Q_SIGNALS:
+ void packagesInstalled();
+ void error(const QString &);
+ void canceled();
+
+ private:
+ KProcess * m_installerProcess;
+ KProgressDialog * m_progressDialog;
+ QString m_executablePath;
+ QStringList m_missingLibraries;
+};
+
+#endif
diff --git a/drkonqi/detachedprocessmonitor.cpp b/drkonqi/detachedprocessmonitor.cpp
new file mode 100644
index 00000000..214e136f
--- /dev/null
+++ b/drkonqi/detachedprocessmonitor.cpp
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#include "detachedprocessmonitor.h"
+
+#include
+
+#include
+
+#include
+
+DetachedProcessMonitor::DetachedProcessMonitor(QObject *parent)
+ : QObject(parent), m_pid(0)
+{
+}
+
+void DetachedProcessMonitor::startMonitoring(int pid)
+{
+ m_pid = pid;
+ startTimer(10);
+}
+
+void DetachedProcessMonitor::timerEvent(QTimerEvent *event)
+{
+ Q_ASSERT(m_pid != 0);
+ if (::kill(m_pid, 0) < 0) {
+ kDebug() << "Process" << m_pid << "finished. kill(2) returned errno:" << perror;
+ killTimer(event->timerId());
+ m_pid = 0;
+ emit processFinished();
+ }
+}
+
+#include "detachedprocessmonitor.moc"
diff --git a/drkonqi/detachedprocessmonitor.h b/drkonqi/detachedprocessmonitor.h
new file mode 100644
index 00000000..1d8244e1
--- /dev/null
+++ b/drkonqi/detachedprocessmonitor.h
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef DETACHEDPROCESSMONITOR_H
+#define DETACHEDPROCESSMONITOR_H
+
+#include
+
+class DetachedProcessMonitor : public QObject
+{
+ Q_OBJECT
+public:
+ explicit DetachedProcessMonitor(QObject *parent = 0);
+ void startMonitoring(int pid);
+
+signals:
+ void processFinished();
+
+protected:
+ virtual void timerEvent(QTimerEvent *);
+
+private:
+ int m_pid;
+};
+
+#endif
diff --git a/drkonqi/doc/debug_package_installer.txt b/drkonqi/doc/debug_package_installer.txt
new file mode 100644
index 00000000..ce1178da
--- /dev/null
+++ b/drkonqi/doc/debug_package_installer.txt
@@ -0,0 +1,86 @@
+This version of DrKonqi supports automatic installation of debug symbols packages
+when it finds that debug symbols are missing. This document is to explain what is
+needed from packagers to do in order to enable this functionality for their distribution.
+
+If your distribution does not ship packages with debug symbols you can safely ignore
+the rest of this document. In this case, DrKonqi will not offer the ability to install
+debug symbol packages.
+
+If your distribution does ship packages with debug symbols, then in order for DrKonqi
+to offer the ability to install them automatically, you need to provide a script that
+will do the work. This is because the packaging systems vary a lot among different
+distributions and DrKonqi cannot implement distro-specific functionality in its main
+code for all distributions.
+
+Please note that I chose to use the word "script" here having in mind a shell script,
+but you may as well provide a python script, a perl script, or whatever else, even a
+compiled binary written in any language you want. DrKonqi will use KProcess for
+launching it, so as long as it is executable, it will work.
+
+
+Name of the script
+==================
+By default DrKonqi looks for a shell script called "installdbgsymbols.sh". It expects
+it to be in PATH, or somewhere that it is possible to be located by KStandardDirs::findExe().
+For example, the path where DrKonqi itself is installed (`kde4-config --path libexec`),
+is a valid path to install this script, although it is not in PATH.
+
+If you wish to provide a script with a different name, you can change the name by setting
+the cmake variable DEBUG_PACKAGE_INSTALLER_NAME to the name that you want. For example,
+configuring kdebase-runtime with:
+
+ cmake -DDEBUG_PACKAGE_INSTALLER_NAME="installdbgsymbols.py"
+
+will use "installdbgsymbols.py" as the script for installing debug packages.
+
+
+Interface of the script
+=======================
+
+1. Arguments
+------------
+The script is called with arguments all the filenames of the binaries that are clearly
+missing symbols. The first argument (argv[1]) is always supplied and is the path to
+the executable that crashed itself. The rest of the arguments are optional and are filenames
+of libraries that are missing symbols (for example, "/usr/lib/libkio.so.5"). All the
+paths are absolute, but they will probably point to symlinks (at least for libraries).
+The paths are taken from gdb. For each stack frame that is missing details, if gdb can
+tell where is this symbol from, the path to the library that gdb specifies is passed
+as is to the script. Note that for applications that were launched via kdeinit, argv[1]
+is the path to kdeinit4, not the path to the executable that would be launched if there
+was no kdeinit involved.
+
+2. Return values
+----------------
+0 - Debug packages installed successfully
+1 - Some kind of error was encountered
+2 - Debug symbols not found
+3 - User canceled the operation
+
+
+Testing
+=======
+In order to test your script you can try the following:
+1) Find a kde application and remove its debug symbols package. I will use konqueror
+ in this example.
+2) Run the application and then kill it with a signal that drkonqi can catch.
+ For example, "killall -6 konqueror".
+3) In drkonqi's main dialog, switch to the "Backtrace" tab and wait for it to
+ generate a backtrace.
+4) After the backtrace has been generated, if drkonqi can find your script, a button
+ saying "Install debug symbols" will appear in the bottom left side of the backtrace tab.
+5) Click on it and your script will be launched.
+
+
+Examples
+========
+I have written example scripts for Debian, OpenSuSE and Fedora, which are available
+in the examples/ subdirectory of the drkonqi source code directory. These were
+developed as a proof of concept, to test that this script model and interface will
+work for most distributions. You may use them as is, or you may use them as references
+to write your own scripts. Just note that I am not going to maintain those scripts
+or fix bugs in them.
+
+--
+George Kiagiadakis
+Last updated: 25 Semptember 2009
diff --git a/drkonqi/doc/examples/installdbgsymbols_debian.sh b/drkonqi/doc/examples/installdbgsymbols_debian.sh
new file mode 100644
index 00000000..e1eaa552
--- /dev/null
+++ b/drkonqi/doc/examples/installdbgsymbols_debian.sh
@@ -0,0 +1,151 @@
+#!/bin/sh
+#
+# Copyright (C) 2009 George Kiagiadakis
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+
+# This function runs a command in a terminal
+# The first argument ($1) must be the full command to run.
+# It returns 0 if the command finished or 1 if the user closed
+# the terminal without waiting for the command to finish.
+# The return value of the command is saved in the $exit_status variable.
+run_in_terminal()
+{
+ local fifo=/tmp/drkonqi-fifo-$$
+ mkfifo $fifo
+
+ # start terminal
+ x-terminal-emulator -e sh -c "echo \$\$ > $fifo; $1; exit_status=\$?; sleep 1; rm $fifo; echo \$exit_status > $fifo" &
+
+ # wait for it to finish
+ local pid=`cat $fifo`
+ while [ "$?" = "0" ]; do
+ sleep 1
+ kill -0 $pid 2>/dev/null
+ done
+
+ # check if terminal has finished succesfully and return the command's exit status
+ local canceled=0
+ if [ -p $fifo ]; then
+ # terminal was closed before finishing execution
+ canceled=1
+ else
+ exit_status=`cat $fifo`
+ #echo "\"$1\" returned: $exit_status"
+ fi
+ rm $fifo
+ return $canceled
+}
+
+# check for availability of kdialog
+which kdialog >/dev/null
+if [ "$?" != "0" ]; then
+ xmessage -center "Could not find kdialog (part of kdebase). Please install kdialog and try again."
+ exit 1
+fi
+
+# check misc script dependencies
+check_dep()
+{
+ which $1 >/dev/null
+ if [ "$?" != "0" ]; then
+ kdialog --sorry "$1 was not found on your system. Please install $1 and try again."
+ exit 1
+ fi
+}
+
+check_dep apt-file
+check_dep qdbus
+
+# update apt-file database
+run_in_terminal "apt-file update"
+
+if [ "$?" = "1" ]; then
+ exit 3
+elif [ "$exit_status" != "0" ]; then
+ kdialog --sorry "apt-file failed to update package lists."
+ exit 1
+fi
+
+# start searching for packages
+packages=""
+progress_counter=0
+dbus_handle=`kdialog --progressbar "Searching for packages that contain the requested debug symbols..." $#`
+
+while [ "$1" != "" ];
+do
+ # dereference symlinks
+ cur_file=$1
+ while [ -L "$cur_file" ]; do
+ cur_file="`dirname $cur_file`/`ls -l $cur_file | cut -d ' ' -f 10`"
+ done
+
+ # look for the package
+ expr match "$cur_file" ".*libQt.*" >/dev/null
+ if [ "$?" = "0" ]; then
+ # HACK for Qt, which doesn't install debug symbols in /usr/lib/debug like everybody else
+ package="libqt4-dbg"
+ else
+ package=`apt-file search --non-interactive --package-only --fixed-string "/usr/lib/debug$cur_file"`
+ fi
+ packages="$packages $package"
+
+ # update progress dialog
+ progress_counter=$(($progress_counter+1))
+ qdbus $dbus_handle Set org.kde.kdialog.ProgressDialog value $progress_counter
+
+ # check if dialog was closed
+ if [ "$?" != "0" ]; then
+ exit 3
+ fi
+
+ shift
+done
+
+# filter out duplicates
+packages=`echo "$packages" | tr " " "\n" | sort | uniq | tr "\n" " "`
+
+# close the progress dialog
+qdbus $dbus_handle close
+
+# if there are no packages to install, exit
+trimmed_packages=`echo $packages | tr -d "[:blank:]"`
+if [ -z "$trimmed_packages" ]; then
+ exit 2 # note that we don't need to display an error message here. drkonqi will do it for us.
+fi
+
+kdialog --yesno "You need to install the following packages: $packages
+Would you like drkonqi to attempt to install them now?"
+
+if [ "$?" = "0" ]; then
+ # determine package manager
+ package_manager=aptitude
+ which $package_manager >/dev/null
+ if [ "$?" != "0" ]; then
+ package_manager=apt-get
+ fi
+
+ run_in_terminal "su-to-root -c '$package_manager install $packages'"
+
+ if [ "$?" = "1" ]; then
+ exit 3
+ elif [ "$exit_status" = "0" ]; then
+ exit 0
+ else
+ exit 1
+ fi
+else
+ exit 3
+fi
diff --git a/drkonqi/doc/examples/installdbgsymbols_fedora.sh b/drkonqi/doc/examples/installdbgsymbols_fedora.sh
new file mode 100644
index 00000000..4a1254ab
--- /dev/null
+++ b/drkonqi/doc/examples/installdbgsymbols_fedora.sh
@@ -0,0 +1,91 @@
+#!/bin/sh
+#
+# Copyright (C) 2009 George Kiagiadakis
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+
+# This function runs a command in a terminal
+# The first argument ($1) must be the full command to run.
+# It returns 0 if the command finished or 1 if the user closed
+# the terminal without waiting for the command to finish.
+# The return value of the command is saved in the $exit_status variable.
+run_in_terminal()
+{
+ local fifo=/tmp/drkonqi-fifo-$$
+ mkfifo $fifo
+
+ # start terminal
+ konsole -e sh -c "echo \$\$ > $fifo; $1; exit_status=\$?; sleep 1; rm $fifo; echo \$exit_status > $fifo" &
+
+ # wait for it to finish
+ local pid=`cat $fifo`
+ while [ "$?" = "0" ]; do
+ sleep 1
+ kill -0 $pid 2>/dev/null
+ done
+
+ # check if terminal has finished succesfully and return the command's exit status
+ local canceled=0
+ if [ -p $fifo ]; then
+ # terminal was closed before finishing execution
+ canceled=1
+ else
+ exit_status=`cat $fifo`
+ #echo "\"$1\" returned: $exit_status"
+ fi
+ rm $fifo
+ return $canceled
+}
+
+# check misc script dependencies
+check_dep()
+{
+ which $1 >/dev/null
+ if [ "$?" != "0" ]; then
+ # check for availability of kdialog
+ which kdialog >/dev/null
+ if [ "$?" != "0" ]; then
+ xmessage -center "$1 was not found on your system. Please install $1 and try again."
+ else
+ kdialog --sorry "$1 was not found on your system. Please install $1 and try again."
+ fi
+ exit 1
+ fi
+}
+
+check_dep debuginfo-install
+check_dep konsole
+
+# start searching for packages
+packages=""
+while [ "$1" != "" ];
+do
+ package=`rpm -q --whatprovides "$1" --queryformat "%{NAME}"`
+ packages="$packages $package"
+ shift
+done
+
+# filter out duplicates
+packages=`echo "$packages" | tr " " "\n" | sort | uniq | tr "\n" " "`
+
+run_in_terminal "su -c \"debuginfo-install $packages\""
+
+if [ "$?" = "1" ]; then
+ exit 3
+elif [ "$exit_status" = "0" ]; then
+ exit 0
+else
+ exit 1
+fi
diff --git a/drkonqi/doc/examples/installdbgsymbols_suse.sh b/drkonqi/doc/examples/installdbgsymbols_suse.sh
new file mode 100644
index 00000000..dbc7468f
--- /dev/null
+++ b/drkonqi/doc/examples/installdbgsymbols_suse.sh
@@ -0,0 +1,94 @@
+#!/bin/sh
+#
+# Copyright (C) 2009 George Kiagiadakis
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+
+# This function runs a command in a terminal
+# The first argument ($1) must be the full command to run.
+# It returns 0 if the command finished or 1 if the user closed
+# the terminal without waiting for the command to finish.
+# The return value of the command is saved in the $exit_status variable.
+run_in_terminal()
+{
+ local fifo=/tmp/drkonqi-fifo-$$
+ mkfifo $fifo
+
+ # start terminal
+ konsole -e sh -c "echo \$\$ > $fifo; $1; exit_status=\$?; sleep 1; rm $fifo; echo \$exit_status > $fifo" &
+
+ # wait for it to finish
+ local pid=`cat $fifo`
+ while [ "$?" = "0" ]; do
+ sleep 1
+ kill -0 $pid 2>/dev/null
+ done
+
+ # check if terminal has finished succesfully and return the command's exit status
+ local canceled=0
+ if [ -p $fifo ]; then
+ # terminal was closed before finishing execution
+ canceled=1
+ else
+ exit_status=`cat $fifo`
+ #echo "\"$1\" returned: $exit_status"
+ fi
+ rm $fifo
+ return $canceled
+}
+
+# check misc script dependencies
+check_dep()
+{
+ which $1 >/dev/null
+ if [ "$?" != "0" ]; then
+ # check for availability of kdialog
+ which kdialog >/dev/null
+ if [ "$?" != "0" ]; then
+ xmessage -center "$1 was not found on your system. Please install $1 and try again."
+ else
+ kdialog --sorry "$1 was not found on your system. Please install $1 and try again."
+ fi
+ exit 1
+ fi
+}
+
+check_dep pbuildid
+check_dep konsole
+
+# start searching for packages
+packages=""
+while [ "$1" != "" ];
+do
+ # look for the build id
+ file -L "$1" | grep ELF >/dev/null
+ if [ "$?" = "0" ]; then
+ buildid=`pbuildid "$1" | cut -d ' ' -f 2`
+ package="\"debuginfo(build-id)=$buildid\""
+ packages="$packages $package"
+ fi
+
+ shift
+done
+
+run_in_terminal "sudo zypper install -C $packages"
+
+if [ "$?" = "1" ]; then
+ exit 3
+elif [ "$exit_status" = "0" ]; then
+ exit 0
+else
+ exit 1
+fi
diff --git a/drkonqi/drkonqi-rename-config-section.upd b/drkonqi/drkonqi-rename-config-section.upd
new file mode 100644
index 00000000..413908f7
--- /dev/null
+++ b/drkonqi/drkonqi-rename-config-section.upd
@@ -0,0 +1,5 @@
+# the [drkonqi] section has been renamed to "[DrKonqi]"
+Id=kde-4.11
+File=drkonqirc
+Group=drkonqi, DrKonqi
+AllKeys
diff --git a/drkonqi/drkonqi.cpp b/drkonqi/drkonqi.cpp
new file mode 100644
index 00000000..7be87d74
--- /dev/null
+++ b/drkonqi/drkonqi.cpp
@@ -0,0 +1,197 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+ Parts of this code were originally under the following license:
+
+ * Copyright (C) 2000-2003 Hans Petter Bieker
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+#include "drkonqi.h"
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "systeminformation.h"
+#include "crashedapplication.h"
+#include "drkonqibackends.h"
+
+DrKonqi::DrKonqi()
+{
+ m_backend = new KCrashBackend();
+ m_systemInformation = new SystemInformation();
+}
+
+DrKonqi::~DrKonqi()
+{
+ delete m_systemInformation;
+ delete m_backend;
+}
+
+//static
+DrKonqi *DrKonqi::instance()
+{
+ static DrKonqi *drKonqiInstance = NULL;
+ if (!drKonqiInstance) {
+ drKonqiInstance = new DrKonqi();
+ }
+ return drKonqiInstance;
+}
+
+//based on KCrashDelaySetHandler from kdeui/util/kcrash.cpp
+class EnableCrashCatchingDelayed : public QObject
+{
+public:
+ EnableCrashCatchingDelayed() {
+ startTimer(10000); // 10 s
+ }
+protected:
+ void timerEvent(QTimerEvent *event) {
+ kDebug() << "Enabling drkonqi crash catching";
+ KCrash::setDrKonqiEnabled(true);
+ killTimer(event->timerId());
+ this->deleteLater();
+ }
+};
+
+bool DrKonqi::init()
+{
+ if (!instance()->m_backend->init()) {
+ cleanup();
+ return false;
+ } else { //all ok, continue initialization
+ // Set drkonqi to handle its own crashes, but only if the crashed app
+ // is not drkonqi already. If it is drkonqi, delay enabling crash catching
+ // to prevent recursive crashes (in case it crashes at startup)
+ if (crashedApplication()->fakeExecutableBaseName() != "drkonqi") {
+ kDebug() << "Enabling drkonqi crash catching";
+ KCrash::setDrKonqiEnabled(true);
+ } else {
+ new EnableCrashCatchingDelayed;
+ }
+ return true;
+ }
+}
+
+void DrKonqi::cleanup()
+{
+ delete instance();
+}
+
+//static
+SystemInformation *DrKonqi::systemInformation()
+{
+ return instance()->m_systemInformation;
+}
+
+//static
+DebuggerManager* DrKonqi::debuggerManager()
+{
+ return instance()->m_backend->debuggerManager();
+}
+
+//static
+CrashedApplication *DrKonqi::crashedApplication()
+{
+ return instance()->m_backend->crashedApplication();
+}
+
+//static
+void DrKonqi::saveReport(const QString & reportText, QWidget *parent)
+{
+ if (KCmdLineArgs::parsedArgs()->isSet("safer")) {
+ KTemporaryFile tf;
+ tf.setSuffix(".kcrash.txt");
+ tf.setAutoRemove(false);
+
+ if (tf.open()) {
+ QTextStream textStream(&tf);
+ textStream << reportText;
+ textStream.flush();
+ KMessageBox::information(parent, i18nc("@info",
+ "Report saved to %1.",
+ tf.fileName()));
+ } else {
+ KMessageBox::sorry(parent, i18nc("@info","Could not create a file in which to save the report."));
+ }
+ } else {
+ QString defname = getSuggestedKCrashFilename(crashedApplication());
+
+ QWeakPointer dlg = new KFileDialog(defname, QString(), parent);
+ dlg.data()->setSelection(defname);
+ dlg.data()->setCaption(i18nc("@title:window","Select Filename"));
+ dlg.data()->setOperationMode(KFileDialog::Saving);
+ dlg.data()->setMode(KFile::File);
+ dlg.data()->setConfirmOverwrite(true);
+ dlg.data()->exec();
+
+ if (dlg.isNull()) {
+ //Dialog is invalid, it was probably deleted (ex. via DBus call)
+ //return and do not crash
+ return;
+ }
+
+ KUrl fileUrl = dlg.data()->selectedUrl();
+ delete dlg.data();
+
+ if (fileUrl.isValid()) {
+ KTemporaryFile tf;
+ if (tf.open()) {
+ QTextStream ts(&tf);
+ ts << reportText;
+ ts.flush();
+ } else {
+ KMessageBox::sorry(parent, i18nc("@info","Cannot open file %1 "
+ "for writing.", tf.fileName()));
+ return;
+ }
+
+ if (!KIO::NetAccess::upload(tf.fileName(), fileUrl, parent)) {
+ KMessageBox::sorry(parent, KIO::NetAccess::lastErrorString());
+ }
+ }
+ }
+}
+
diff --git a/drkonqi/drkonqi.h b/drkonqi/drkonqi.h
new file mode 100644
index 00000000..95e64dc3
--- /dev/null
+++ b/drkonqi/drkonqi.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef DRKONQI_H
+#define DRKONQI_H
+
+class QString;
+class QWidget;
+
+class SystemInformation;
+class DebuggerManager;
+class CrashedApplication;
+class AbstractDrKonqiBackend;
+
+class DrKonqi
+{
+public:
+ static bool init();
+ static void cleanup();
+
+ static SystemInformation *systemInformation();
+ static DebuggerManager *debuggerManager();
+ static CrashedApplication *crashedApplication();
+
+ static void saveReport(const QString & reportText, QWidget *parent = 0);
+
+private:
+ DrKonqi();
+ ~DrKonqi();
+ static DrKonqi *instance();
+
+ SystemInformation *m_systemInformation;
+ AbstractDrKonqiBackend *m_backend;
+};
+
+#endif
diff --git a/drkonqi/drkonqi_globals.h b/drkonqi/drkonqi_globals.h
new file mode 100644
index 00000000..d5f098a8
--- /dev/null
+++ b/drkonqi/drkonqi_globals.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef DRKONQI_GLOBALS_H
+#define DRKONQI_GLOBALS_H
+
+#include
+#include
+
+/** This class provides a custom constructor to fill the "toolTip"
+ * and "whatsThis" texts of KGuiItem with the same text.
+ */
+class KGuiItem2 : public KGuiItem
+{
+public:
+ inline KGuiItem2(const QString &text, const KIcon &icon, const QString &toolTip)
+ : KGuiItem(text, icon, toolTip, toolTip) {}
+};
+
+/* Urls are defined globally here, so that they can change easily */
+#define KDE_BUGZILLA_URL "https://bugs.kde.org/"
+#define KDE_BUGZILLA_CREATE_ACCOUNT_URL KDE_BUGZILLA_URL "createaccount.cgi"
+#define KDE_BUGZILLA_SHORT_URL "bugs.kde.org"
+#define TECHBASE_HOWTO_DOC "http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Preparing_your_KDE_packages"
+
+/* IDs for bugreport assistant pages -> help anchors */
+#define PAGE_INTRODUCTION_ID "IntroductionID"
+#define PAGE_CRASHINFORMATION_ID "BacktraceID"
+#define PAGE_AWARENESS_ID "AwarenessID"
+#define PAGE_CONCLUSIONS_ID "ConclusionsID"
+#define PAGE_BZLOGIN_ID "BugzillaLoginID"
+#define PAGE_BZDUPLICATES_ID "BugzillaDuplicatesID"
+#define PAGE_BZDETAILS_ID "BugzillaDetailsID"
+#define PAGE_BZPREVIEW_ID "BugzillaPreviewID"
+#define PAGE_BZSEND_ID "BugzillaSendID"
+
+#define PAGE_HELP_BEGIN_ID "Begin"
+
+#endif
diff --git a/drkonqi/drkonqibackends.cpp b/drkonqi/drkonqibackends.cpp
new file mode 100644
index 00000000..064d07d4
--- /dev/null
+++ b/drkonqi/drkonqibackends.cpp
@@ -0,0 +1,243 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#include "drkonqibackends.h"
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "crashedapplication.h"
+#include "debugger.h"
+#include "debuggermanager.h"
+#include "backtracegenerator.h"
+
+AbstractDrKonqiBackend::~AbstractDrKonqiBackend()
+{
+}
+
+bool AbstractDrKonqiBackend::init()
+{
+ m_crashedApplication = constructCrashedApplication();
+ m_debuggerManager = constructDebuggerManager();
+ return true;
+}
+
+
+KCrashBackend::KCrashBackend()
+ : QObject(), AbstractDrKonqiBackend(), m_state(ProcessRunning)
+{
+}
+
+KCrashBackend::~KCrashBackend()
+{
+ continueAttachedProcess();
+}
+
+bool KCrashBackend::init()
+{
+ AbstractDrKonqiBackend::init();
+
+ QString startupId(KCmdLineArgs::parsedArgs()->getOption("startupid"));
+ if (!startupId.isEmpty()) { // stop startup notification
+ KStartupInfoId id;
+ id.initId(startupId.toLocal8Bit());
+ KStartupInfo::sendFinish(id);
+ }
+
+ //check whether the attached process exists and whether we have permissions to inspect it
+ if (crashedApplication()->pid() <= 0) {
+ kError() << "Invalid pid specified";
+ return false;
+ }
+
+#if !defined(Q_OS_WIN32)
+ if (::kill(crashedApplication()->pid(), 0) < 0) {
+ switch (errno) {
+ case EPERM:
+ kError() << "DrKonqi doesn't have permissions to inspect the specified process";
+ break;
+ case ESRCH:
+ kError() << "The specified process does not exist.";
+ break;
+ default:
+ break;
+ }
+ return false;
+ }
+
+ //--keeprunning means: generate backtrace instantly and let the process continue execution
+ if(KCmdLineArgs::parsedArgs()->isSet("keeprunning")) {
+ stopAttachedProcess();
+ debuggerManager()->backtraceGenerator()->start();
+ connect(debuggerManager(), SIGNAL(debuggerFinished()), SLOT(continueAttachedProcess()));
+ } else {
+ connect(debuggerManager(), SIGNAL(debuggerStarting()), SLOT(onDebuggerStarting()));
+ connect(debuggerManager(), SIGNAL(debuggerFinished()), SLOT(onDebuggerFinished()));
+
+ //stop the process to avoid high cpu usage by other threads (bug 175362).
+ //if the process was started by kdeinit, we need to wait a bit for KCrash
+ //to reach the alarm(0); call in kdeui/util/kcrash.cpp line 406 or else
+ //if we stop it before this call, pending alarm signals will kill the
+ //process when we try to continue it.
+ QTimer::singleShot(2000, this, SLOT(stopAttachedProcess()));
+ }
+#endif
+
+ //Handle drkonqi crashes
+ s_pid = crashedApplication()->pid(); //copy pid for use by the crash handler, so that it is safer
+ KCrash::setEmergencySaveFunction(emergencySaveFunction);
+
+ return true;
+}
+
+CrashedApplication *KCrashBackend::constructCrashedApplication()
+{
+ CrashedApplication *a = new CrashedApplication(this);
+ a->m_datetime = QDateTime::currentDateTime();
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ a->m_name = args->getOption("programname");
+ a->m_version = args->getOption("appversion").toUtf8();
+ a->m_reportAddress = BugReportAddress(args->getOption("bugaddress").toUtf8());
+ a->m_pid = args->getOption("pid").toInt();
+ a->m_signalNumber = args->getOption("signal").toInt();
+ a->m_restarted = args->isSet("restarted");
+ a->m_thread = args->getOption("thread").toInt();
+
+ //try to determine the executable that crashed
+ if ( QFileInfo(QString("/proc/%1/exe").arg(a->m_pid)).exists() ) {
+ //on linux, the fastest and most reliable way is to get the path from /proc
+ kDebug() << "Using /proc to determine executable path";
+ a->m_executable.setFile(QFile::symLinkTarget(QString("/proc/%1/exe").arg(a->m_pid)));
+
+ if (args->isSet("kdeinit") ||
+ a->m_executable.fileName().startsWith("python") ) {
+
+ a->m_fakeBaseName = args->getOption("appname");
+ }
+ } else {
+ if ( args->isSet("kdeinit") ) {
+ a->m_executable = QFileInfo(KStandardDirs::findExe("kdeinit4"));
+ a->m_fakeBaseName = args->getOption("appname");
+ } else {
+ QFileInfo execPath(args->getOption("appname"));
+ if ( execPath.isAbsolute() ) {
+ a->m_executable = execPath;
+ } else if ( !args->getOption("apppath").isEmpty() ) {
+ QDir execDir(args->getOption("apppath"));
+ a->m_executable = execDir.absoluteFilePath(execPath.fileName());
+ } else {
+ a->m_executable = QFileInfo(KStandardDirs::findExe(execPath.fileName()));
+ }
+ }
+ }
+
+ kDebug() << "Executable is:" << a->m_executable.absoluteFilePath();
+ kDebug() << "Executable exists:" << a->m_executable.exists();
+
+ return a;
+}
+
+DebuggerManager *KCrashBackend::constructDebuggerManager()
+{
+ QList internalDebuggers = Debugger::availableInternalDebuggers("KCrash");
+ KConfigGroup config(KGlobal::config(), "DrKonqi");
+#ifndef Q_OS_WIN
+ QString defaultDebuggerName = config.readEntry("Debugger", QString("gdb"));
+#else
+ QString defaultDebuggerName = config.readEntry("Debugger", QString("kdbgwin"));
+#endif
+
+ Debugger firstKnownGoodDebugger, preferredDebugger;
+ foreach (const Debugger & debugger, internalDebuggers) {
+ if (!firstKnownGoodDebugger.isValid() && debugger.isInstalled()) {
+ firstKnownGoodDebugger = debugger;
+ }
+ if (debugger.codeName() == defaultDebuggerName) {
+ preferredDebugger = debugger;
+ }
+ if (firstKnownGoodDebugger.isValid() && preferredDebugger.isValid()) {
+ break;
+ }
+ }
+
+ if (!preferredDebugger.isInstalled()) {
+ if (firstKnownGoodDebugger.isValid()) {
+ preferredDebugger = firstKnownGoodDebugger;
+ } else {
+ kError() << "Unable to find an internal debugger that can work with the KCrash backend";
+ }
+ }
+
+ return new DebuggerManager(preferredDebugger, Debugger::availableExternalDebuggers("KCrash"), this);
+}
+
+void KCrashBackend::stopAttachedProcess()
+{
+ if (m_state == ProcessRunning) {
+ kDebug() << "Sending SIGSTOP to process";
+ ::kill(crashedApplication()->pid(), SIGSTOP);
+ m_state = ProcessStopped;
+ }
+}
+
+void KCrashBackend::continueAttachedProcess()
+{
+ if (m_state == ProcessStopped) {
+ kDebug() << "Sending SIGCONT to process";
+ ::kill(crashedApplication()->pid(), SIGCONT);
+ m_state = ProcessRunning;
+ }
+}
+
+void KCrashBackend::onDebuggerStarting()
+{
+ continueAttachedProcess();
+ m_state = DebuggerRunning;
+}
+
+void KCrashBackend::onDebuggerFinished()
+{
+ m_state = ProcessRunning;
+ stopAttachedProcess();
+}
+
+//static
+qint64 KCrashBackend::s_pid = 0;
+
+//static
+void KCrashBackend::emergencySaveFunction(int signal)
+{
+ // In case drkonqi itself crashes, we need to get rid of the process being debugged,
+ // so we kill it, no matter what its state was.
+ Q_UNUSED(signal);
+ ::kill(s_pid, SIGKILL);
+}
+
+#include "drkonqibackends.moc"
diff --git a/drkonqi/drkonqibackends.h b/drkonqi/drkonqibackends.h
new file mode 100644
index 00000000..99b8a523
--- /dev/null
+++ b/drkonqi/drkonqibackends.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2009 George Kiagiadakis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+#ifndef DRKONQIBACKENDS_H
+#define DRKONQIBACKENDS_H
+
+#include
+
+class CrashedApplication;
+class DebuggerManager;
+
+class AbstractDrKonqiBackend
+{
+public:
+ virtual ~AbstractDrKonqiBackend();
+ virtual bool init();
+
+ inline CrashedApplication *crashedApplication() const {
+ return m_crashedApplication;
+ }
+
+ inline DebuggerManager *debuggerManager() const {
+ return m_debuggerManager;
+ }
+
+protected:
+ virtual CrashedApplication *constructCrashedApplication() = 0;
+ virtual DebuggerManager *constructDebuggerManager() = 0;
+
+private:
+ CrashedApplication *m_crashedApplication;
+ DebuggerManager *m_debuggerManager;
+};
+
+class KCrashBackend : public QObject, public AbstractDrKonqiBackend
+{
+ Q_OBJECT
+public:
+ KCrashBackend();
+ virtual ~KCrashBackend();
+ virtual bool init();
+
+protected:
+ virtual CrashedApplication *constructCrashedApplication();
+ virtual DebuggerManager *constructDebuggerManager();
+
+private slots:
+ void stopAttachedProcess();
+ void continueAttachedProcess();
+ void onDebuggerStarting();
+ void onDebuggerFinished();
+
+private:
+ static void emergencySaveFunction(int signal);
+ static qint64 s_pid; //for use by the emergencySaveFunction
+
+ enum State { ProcessRunning, ProcessStopped, DebuggerRunning };
+ State m_state;
+};
+
+#endif // DRKONQIBACKENDS_H
diff --git a/drkonqi/drkonqidialog.cpp b/drkonqi/drkonqidialog.cpp
new file mode 100644
index 00000000..0ea39319
--- /dev/null
+++ b/drkonqi/drkonqidialog.cpp
@@ -0,0 +1,284 @@
+/*******************************************************************
+* drkonqidialog.cpp
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#include "drkonqidialog.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "drkonqi.h"
+#include "backtracewidget.h"
+#include "reportassistantdialog.h"
+#include "aboutbugreportingdialog.h"
+#include "crashedapplication.h"
+#include "debuggermanager.h"
+#include "debuggerlaunchers.h"
+#include "drkonqi_globals.h"
+
+static const char ABOUT_BUG_REPORTING_URL[] = "#aboutbugreporting";
+static const char DRKONQI_REPORT_BUG_URL[] =
+ KDE_BUGZILLA_URL "enter_bug.cgi?product=drkonqi&format=guided";
+
+DrKonqiDialog::DrKonqiDialog(QWidget * parent) :
+ KDialog(parent),
+ m_aboutBugReportingDialog(0),
+ m_backtraceWidget(0)
+{
+ KGlobal::ref();
+ setAttribute(Qt::WA_DeleteOnClose, true);
+
+ //Setting dialog title and icon
+ setCaption(DrKonqi::crashedApplication()->name());
+ setWindowIcon(KIcon("tools-report-bug"));
+
+ m_tabWidget = new KTabWidget(this);
+ setMainWidget(m_tabWidget);
+
+ connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabIndexChanged(int)));
+
+ buildIntroWidget();
+ m_tabWidget->addTab(m_introWidget, i18nc("@title:tab general information", "&General"));
+
+ m_backtraceWidget = new BacktraceWidget(DrKonqi::debuggerManager()->backtraceGenerator(), this);
+ m_backtraceWidget->setMinimumSize(QSize(575, 240));
+ m_tabWidget->addTab(m_backtraceWidget, i18nc("@title:tab", "&Developer Information"));
+
+ buildDialogButtons();
+
+ setMinimumSize(QSize(640,320));
+ resize(minimumSize());
+ KConfigGroup config(KGlobal::config(), "General");
+ restoreDialogSize(config);
+}
+
+DrKonqiDialog::~DrKonqiDialog()
+{
+ KConfigGroup config(KGlobal::config(), "General");
+ saveDialogSize(config);
+
+ KGlobal::deref();
+}
+
+void DrKonqiDialog::tabIndexChanged(int index)
+{
+ if (index == m_tabWidget->indexOf(m_backtraceWidget)) {
+ m_backtraceWidget->generateBacktrace();
+ }
+}
+
+void DrKonqiDialog::buildIntroWidget()
+{
+ const CrashedApplication *crashedApp = DrKonqi::crashedApplication();
+
+ m_introWidget = new QWidget(this);
+ ui.setupUi(m_introWidget);
+
+ ui.titleLabel->setText(i18nc("@info", "We are sorry, %1 "
+ "closed unexpectedly.", crashedApp->name()));
+
+ QString reportMessage;
+ if (!crashedApp->bugReportAddress().isEmpty()) {
+ if (crashedApp->fakeExecutableBaseName() == QLatin1String("drkonqi")) { //Handle own crashes
+ reportMessage = i18nc("@info", "As the Crash Handler itself has failed, the "
+ "automatic reporting process is disabled to reduce the "
+ "risks of failing again."
+ "Please, manually report this error "
+ "to the KDE bug tracking system. Do not forget to include "
+ "the backtrace from the Developer Information "
+ "tab.",
+ QLatin1String(DRKONQI_REPORT_BUG_URL));
+ } else if (KCmdLineArgs::parsedArgs()->isSet("safer")) {
+ reportMessage = i18nc("@info", "The reporting assistant is disabled because "
+ "the crash handler dialog was started in safe mode."
+ "You can manually report this bug to %1 "
+ "(including the backtrace from the "
+ "Developer Information "
+ "tab.)", crashedApp->bugReportAddress());
+ } else {
+ reportMessage = i18nc("@info", "You can help us improve KDE Software by reporting "
+ "this error.Learn "
+ "more about bug reporting.It is "
+ "safe to close this dialog if you do not want to report "
+ "this bug.",
+ QLatin1String(ABOUT_BUG_REPORTING_URL)
+ );
+ }
+ } else {
+ reportMessage = i18nc("@info", "You cannot report this error, because "
+ "%1 does not provide a bug reporting "
+ "address.",
+ crashedApp->name()
+ );
+ }
+ ui.infoLabel->setText(reportMessage);
+ connect(ui.infoLabel, SIGNAL(linkActivated(QString)), this, SLOT(linkActivated(QString)));
+
+ ui.iconLabel->setPixmap(
+ QPixmap(KStandardDirs::locate("appdata", QLatin1String("pics/crash.png"))));
+
+ ui.detailsTitleLabel->setText(QString("%1").arg(i18nc("@label","Details:")));
+
+ ui.detailsLabel->setText(i18nc("@info Note the time information is divided into date and time parts",
+ "Executable: %1"
+ " PID: %2 Signal: %3 (%4) "
+ "Time: %5 %6",
+ crashedApp->fakeExecutableBaseName(),
+ crashedApp->pid(),
+ crashedApp->signalName(),
+ #if defined(Q_OS_UNIX)
+ crashedApp->signalNumber(),
+ #else
+ //windows uses weird big numbers for exception codes,
+ //so it doesn't make sense to display them in decimal
+ QString().sprintf("0x%8x", crashedApp->signalNumber()),
+ #endif
+ KGlobal::locale()->formatDate(crashedApp->datetime().date(), KLocale::ShortDate),
+
+ KGlobal::locale()->formatTime(crashedApp->datetime().time(), true)
+ ));
+}
+
+void DrKonqiDialog::buildDialogButtons()
+{
+ const CrashedApplication *crashedApp = DrKonqi::crashedApplication();
+
+ //Set kdialog buttons
+ setButtons(KDialog::User3 | KDialog::User2 | KDialog::User1 | KDialog::Close);
+
+ //Report bug button
+ setButtonGuiItem(KDialog::User1, KGuiItem2(i18nc("@action:button", "Report &Bug"),
+ KIcon("tools-report-bug"),
+ i18nc("@info:tooltip",
+ "Starts the bug report assistant.")));
+
+ bool enableReportAssistant = !crashedApp->bugReportAddress().isEmpty() &&
+ crashedApp->fakeExecutableBaseName() != QLatin1String("drkonqi") &&
+ !KCmdLineArgs::parsedArgs()->isSet("safer");
+ enableButton(KDialog::User1, enableReportAssistant);
+ connect(this, SIGNAL(user1Clicked()), this, SLOT(startBugReportAssistant()));
+
+ //Default debugger button and menu (only for developer mode)
+ DebuggerManager *debuggerManager = DrKonqi::debuggerManager();
+ setButtonGuiItem(KDialog::User2, KGuiItem2(i18nc("@action:button this is the debug menu button "
+ "label which contains the debugging applications",
+ "&Debug"), KIcon("applications-development"),
+ i18nc("@info:tooltip", "Starts a program to debug "
+ "the crashed application.")));
+ showButton(KDialog::User2, debuggerManager->showExternalDebuggers());
+
+ m_debugMenu = new KMenu(this);
+ setButtonMenu(KDialog::User2, m_debugMenu);
+
+ QList debuggers = debuggerManager->availableExternalDebuggers();
+ foreach(AbstractDebuggerLauncher *launcher, debuggers) {
+ addDebugger(launcher);
+ }
+
+ connect(debuggerManager, SIGNAL(externalDebuggerAdded(AbstractDebuggerLauncher*)),
+ SLOT(addDebugger(AbstractDebuggerLauncher*)));
+ connect(debuggerManager, SIGNAL(externalDebuggerRemoved(AbstractDebuggerLauncher*)),
+ SLOT(removeDebugger(AbstractDebuggerLauncher*)));
+ connect(debuggerManager, SIGNAL(debuggerRunning(bool)), SLOT(enableDebugMenu(bool)));
+
+ //Restart application button
+ setButtonGuiItem(KDialog::User3, KGuiItem2(i18nc("@action:button", "&Restart Application"),
+ KIcon("system-reboot"),
+ i18nc("@info:tooltip", "Use this button to restart "
+ "the crashed application.")));
+ enableButton(KDialog::User3, !crashedApp->hasBeenRestarted() &&
+ crashedApp->fakeExecutableBaseName() != QLatin1String("drkonqi"));
+ connect(this, SIGNAL(user3Clicked()), crashedApp, SLOT(restart()));
+ connect(crashedApp, SIGNAL(restarted(bool)), this, SLOT(applicationRestarted(bool)));
+
+ //Close button
+ QString tooltipText = i18nc("@info:tooltip",
+ "Close this dialog (you will lose the crash information.)");
+ setButtonToolTip(KDialog::Close, tooltipText);
+ setButtonWhatsThis(KDialog::Close, tooltipText);
+ setDefaultButton(KDialog::Close);
+ setButtonFocus(KDialog::Close);
+}
+
+void DrKonqiDialog::addDebugger(AbstractDebuggerLauncher *launcher)
+{
+ QAction *action = new QAction(KIcon("applications-development"),
+ i18nc("@action:inmenu 1 is the debugger name",
+ "Debug in %1",
+ launcher->name()), m_debugMenu);
+ m_debugMenu->addAction(action);
+ connect(action, SIGNAL(triggered()), launcher, SLOT(start()));
+ m_debugMenuActions.insert(launcher, action);
+}
+
+void DrKonqiDialog::removeDebugger(AbstractDebuggerLauncher *launcher)
+{
+ QAction *action = m_debugMenuActions.take(launcher);
+ if ( action ) {
+ m_debugMenu->removeAction(action);
+ action->deleteLater();
+ } else {
+ kError() << "Invalid launcher";
+ }
+}
+
+void DrKonqiDialog::enableDebugMenu(bool debuggerRunning)
+{
+ enableButton(KDialog::User2, !debuggerRunning);
+}
+
+void DrKonqiDialog::startBugReportAssistant()
+{
+ ReportAssistantDialog * bugReportAssistant = new ReportAssistantDialog();
+ close();
+ bugReportAssistant->show();
+}
+
+void DrKonqiDialog::linkActivated(const QString& link)
+{
+ if (link == QLatin1String(ABOUT_BUG_REPORTING_URL)) {
+ showAboutBugReporting();
+ } else if (link == QLatin1String(DRKONQI_REPORT_BUG_URL)) {
+ KToolInvocation::invokeBrowser(link);
+ } else if (link.startsWith(QLatin1String("http"))) {
+ kWarning() << "unexpected link";
+ KToolInvocation::invokeBrowser(link);
+ }
+}
+
+void DrKonqiDialog::showAboutBugReporting()
+{
+ if (!m_aboutBugReportingDialog) {
+ m_aboutBugReportingDialog = new AboutBugReportingDialog();
+ connect(this, SIGNAL(destroyed(QObject*)), m_aboutBugReportingDialog, SLOT(close()));
+ }
+ m_aboutBugReportingDialog->show();
+ m_aboutBugReportingDialog->raise();
+ m_aboutBugReportingDialog->activateWindow();
+}
+
+void DrKonqiDialog::applicationRestarted(bool success)
+{
+ enableButton(KDialog::User3, !success);
+}
diff --git a/drkonqi/drkonqidialog.h b/drkonqi/drkonqidialog.h
new file mode 100644
index 00000000..e118f37d
--- /dev/null
+++ b/drkonqi/drkonqidialog.h
@@ -0,0 +1,76 @@
+/*******************************************************************
+* drkonqidialog.h
+* Copyright 2009 Dario Andres Rodriguez
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#ifndef DRKONQIDIALOG__H
+#define DRKONQIDIALOG__H
+
+#include
+#include
+
+#include
+
+#include "ui_maindialog.h"
+
+class BacktraceWidget;
+class AboutBugReportingDialog;
+class KTabWidget;
+class AbstractDebuggerLauncher;
+class KMenu;
+
+class DrKonqiDialog: public KDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DrKonqiDialog(QWidget * parent = 0);
+ ~DrKonqiDialog();
+
+private Q_SLOTS:
+ void linkActivated(const QString&);
+ void startBugReportAssistant();
+
+ void applicationRestarted(bool success);
+
+ void addDebugger(AbstractDebuggerLauncher *launcher);
+ void removeDebugger(AbstractDebuggerLauncher *launcher);
+ void enableDebugMenu(bool);
+
+ //GUI
+ void buildIntroWidget();
+ void buildDialogButtons();
+
+ void tabIndexChanged(int);
+
+private:
+ void showAboutBugReporting();
+
+ KTabWidget * m_tabWidget;
+
+ QPointer m_aboutBugReportingDialog;
+
+ QWidget * m_introWidget;
+ Ui::MainWidget ui;
+
+ BacktraceWidget * m_backtraceWidget;
+
+ KMenu *m_debugMenu;
+ QHash m_debugMenuActions;
+};
+
+#endif
diff --git a/drkonqi/findconfigdatajob.cpp b/drkonqi/findconfigdatajob.cpp
new file mode 100644
index 00000000..6b20700c
--- /dev/null
+++ b/drkonqi/findconfigdatajob.cpp
@@ -0,0 +1,97 @@
+/*******************************************************************
+* findconfigdatajob.cpp
+* Copyright 2011 Matthias Fuchs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#include "findconfigdatajob.h"
+
+#include
+#include
+#include
+
+FindConfigDataJob::FindConfigDataJob(const QString &productName, const KUrl &bugtrackerBaseUrl, QObject *parent)
+ : KJob(parent),
+ m_job(0),
+ m_url(bugtrackerBaseUrl)
+{
+ m_url.addPath("config.cgi");
+ m_url.addQueryItem("product", productName);
+}
+
+FindConfigDataJob::~FindConfigDataJob()
+{
+ if (m_job) {
+ m_job->kill();
+ }
+}
+
+void FindConfigDataJob::start()
+{
+ m_job = KIO::storedGet(m_url, KIO::Reload, KIO::HideProgressInfo);
+ connect(m_job, SIGNAL(result(KJob*)), this, SLOT(receivedData(KJob*)));
+ connect(m_job, SIGNAL(infoMessage(KJob*,QString,QString)), this, SIGNAL(infoMessage(KJob*,QString,QString)));
+ connect(m_job, SIGNAL(warning(KJob*,QString,QString)), this, SIGNAL(warning(KJob*,QString,QString)));
+
+ m_job->start();
+}
+
+QString FindConfigDataJob::errorString() const
+{
+ return m_errorString;
+}
+
+void FindConfigDataJob::receivedData(KJob *job)
+{
+ Q_UNUSED(job);
+
+ if (m_job->error()) {
+ setError(m_job->error());
+ m_errorString = i18n("Failed to retrieve the config data.");
+ } else {
+ m_data = m_job->data();
+ }
+ m_job = 0;
+ emitResult();
+}
+
+QStringList FindConfigDataJob::data(InformationType type)
+{
+ QStringList result;
+ QString key;
+
+ switch (type) {
+ case Version:
+ key = "version\\['[^\']+'\\]";
+ break;
+ default:
+ Q_ASSERT(false);
+ break;
+ }
+
+ QRegExp rx(key + " = \\[ (('[^\']+', )+) \\];");
+ if (rx.indexIn(m_data) != -1) {
+ QString temp = rx.cap(1);
+ temp.remove('\'');
+ temp.remove(' ');
+ result = temp.split(',', QString::SkipEmptyParts);
+ }
+
+ kDebug() << "Found data for " + key + ':' << result << result.count();
+ return result;
+}
+
+#include "findconfigdatajob.moc"
diff --git a/drkonqi/findconfigdatajob.h b/drkonqi/findconfigdatajob.h
new file mode 100644
index 00000000..63f77614
--- /dev/null
+++ b/drkonqi/findconfigdatajob.h
@@ -0,0 +1,70 @@
+/*******************************************************************
+* findconfigdatajob.h
+* Copyright 2011 Matthias Fuchs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as
+* published by the Free Software Foundation; either version 2 of
+* the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+******************************************************************/
+
+#ifndef DRKONQI_FIND_VERSIONS_JOB_H
+#define DRKONQI_FIND_VERSIONS_JOB_H
+
+#include
+
+#include
+#include
+
+namespace KIO {
+ class StoredTransferJob;
+}
+
+/**
+ * This job downloads config.cgi for a specified product,
+ * looking for the information you want to retrieve
+ */
+class FindConfigDataJob : public KJob
+{
+ Q_OBJECT
+ public:
+ /**
+ * @param productName e.g. "plasma"
+ * @param bugtrackerBaseUrl e.g. "https://bugs.kde.org"
+ */
+ explicit FindConfigDataJob(const QString &productName, const KUrl &bugtrackerBaseUrl, QObject *parent = 0);
+ virtual ~FindConfigDataJob();
+
+ virtual void start();
+ virtual QString errorString() const;
+
+ enum InformationType {
+ Version
+ };
+
+ /**
+ * Call this after the job finished to retrieve the
+ * specified data
+ */
+ QStringList data(InformationType type);
+
+ private slots:
+ void receivedData(KJob *job);
+
+ private:
+ KIO::StoredTransferJob *m_job;
+ KUrl m_url;
+ QString m_data;
+ QString m_errorString;
+};
+
+#endif
diff --git a/drkonqi/gdbhighlighter.cpp b/drkonqi/gdbhighlighter.cpp
new file mode 100644
index 00000000..1dd84820
--- /dev/null
+++ b/drkonqi/gdbhighlighter.cpp
@@ -0,0 +1,141 @@
+/*
+ Copyright (C) 2010 Milian Wolff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+#include "gdbhighlighter.h"
+
+#include
+
+#include
+
+GdbHighlighter::GdbHighlighter(QTextDocument* parent, const QList & gdbLines)
+ : QSyntaxHighlighter(parent)
+{
+ // setup line lookup
+ int l = 0;
+ foreach(const BacktraceLine& line, gdbLines) {
+ lines.insert(l, line);
+ l += line.toString().count('\n');
+ }
+ // Add a dummy, in case the last backtrace line has more than 1 '\n' char.
+ const BacktraceLine dummy;
+ lines.insert(l, dummy);
+
+ // setup formates
+ KColorScheme scheme(QPalette::Active);
+
+ crashFormat.setForeground(scheme.foreground(KColorScheme::NegativeText));
+ nullptrFormat.setForeground(scheme.foreground(KColorScheme::NegativeText));
+ nullptrFormat.setFontWeight(QFont::Bold);
+ assertFormat = nullptrFormat;
+ threadFormat.setForeground(scheme.foreground(KColorScheme::NeutralText));
+ urlFormat.setForeground(scheme.foreground(KColorScheme::LinkText));
+ funcFormat.setForeground(scheme.foreground(KColorScheme::VisitedText));
+ funcFormat.setFontWeight(QFont::Bold);
+ otheridFormat.setForeground(scheme.foreground(KColorScheme::PositiveText));
+ crapFormat.setForeground(scheme.foreground(KColorScheme::InactiveText));
+}
+
+void GdbHighlighter::highlightBlock(const QString& text)
+{
+ int cur = 0;
+ int next;
+ int diff;
+ const QRegExp hexptrPattern("0x[0-9a-f]+", Qt::CaseSensitive, QRegExp::RegExp2);
+ int lineNr = currentBlock().firstLineNumber();
+ while ( cur < text.length() ) {
+ next = text.indexOf('\n', cur);
+ if (next == -1) {
+ next = text.length();
+ }
+ if (lineNr == 0) {
+ // line that contains 'Application: ...'
+ ++lineNr;
+ cur = next;
+ continue;
+ }
+
+ diff = next - cur;
+
+ QString lineStr = text.mid(cur, diff).append('\n');
+ // -1 since we skip the first line
+ QMap< int, BacktraceLine >::iterator it = lines.lowerBound(lineNr - 1);
+ Q_ASSERT(it != lines.end());
+ // QMap::lowerBound() returns the next higher item or
+ // the dummy item, but we want the one before that.
+ if (it.key() > lineNr - 1) {
+ --it;
+ }
+ const BacktraceLine& line = it.value();
+
+ if (line.type() == BacktraceLine::KCrash) {
+ setFormat(cur, diff, crashFormat);
+ } else if (line.type() == BacktraceLine::ThreadStart || line.type() == BacktraceLine::ThreadIndicator) {
+ setFormat(cur, diff, threadFormat);
+ } else if (line.type() == BacktraceLine::Crap) {
+ setFormat(cur, diff, crapFormat);
+ } else if (line.type() == BacktraceLine::StackFrame) {
+ if (!line.fileName().isEmpty()) {
+ int colonPos = line.fileName().lastIndexOf(':');
+ setFormat(lineStr.indexOf(line.fileName()), colonPos == -1 ? line.fileName().length() : colonPos, urlFormat);
+ }
+ if (!line.libraryName().isEmpty()) {
+ setFormat(lineStr.indexOf(line.libraryName()), line.libraryName().length(), urlFormat);
+ }
+ if (!line.functionName().isEmpty()) {
+ int idx = lineStr.indexOf(line.functionName());
+ if (idx != -1) {
+ // highlight Id::Id::Id::Func
+ // Id should have otheridFormat, :: no format and Func funcFormat
+ int i = idx;
+ int from = idx;
+ while (i < idx + line.functionName().length()) {
+ if (lineStr.at(i) == ':') {
+ setFormat(from, i - from, otheridFormat);
+ // skip ::
+ i += 2;
+ from = i;
+ continue;
+ } else if (lineStr.at(i) == '<' || lineStr.at(i) == '>') {
+ setFormat(from, i - from, otheridFormat);
+ ++i;
+ from = i;
+ continue;
+ }
+ ++i;
+ }
+ if (line.functionName() == "qFatal" || line.functionName() == "abort" || line.functionName() == "__assert_fail"
+ || line.functionName() == "*__GI___assert_fail" || line.functionName() == "*__GI_abort") {
+ setFormat(from, i - from, assertFormat);
+ } else {
+ setFormat(from, i - from, funcFormat);
+ }
+ }
+ }
+ // highlight hexadecimal ptrs
+ int idx = 0;
+ while ((idx = hexptrPattern.indexIn(lineStr, idx)) != -1) {
+ if (hexptrPattern.cap() == "0x0") {
+ setFormat(idx, hexptrPattern.matchedLength(), nullptrFormat);
+ }
+ idx += hexptrPattern.matchedLength();
+ }
+ }
+
+ cur = next;
+ ++lineNr;
+ }
+}
diff --git a/drkonqi/gdbhighlighter.h b/drkonqi/gdbhighlighter.h
new file mode 100644
index 00000000..6d26b2ab
--- /dev/null
+++ b/drkonqi/gdbhighlighter.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2010 Milian Wolff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+#ifndef GDBHIGHLIGHTER_H
+#define GDBHIGHLIGHTER_H
+
+#include
+
+#include "parser/backtraceline.h"
+
+class GdbHighlighter : public QSyntaxHighlighter
+{
+public:
+ GdbHighlighter(QTextDocument* parent, const QList & gdbLines);
+
+protected:
+ virtual void highlightBlock(const QString& text);
+
+private:
+ QMap lines;
+ QTextCharFormat crashFormat;
+ QTextCharFormat nullptrFormat;
+ QTextCharFormat assertFormat;
+ QTextCharFormat threadFormat;
+ QTextCharFormat urlFormat;
+ QTextCharFormat funcFormat;
+ QTextCharFormat otheridFormat;
+ QTextCharFormat crapFormat;
+};
+
+#endif // GDBHIGHLIGHTER_H
diff --git a/drkonqi/kdbgwin/CMakeLists.txt b/drkonqi/kdbgwin/CMakeLists.txt
new file mode 100644
index 00000000..7c39a248
--- /dev/null
+++ b/drkonqi/kdbgwin/CMakeLists.txt
@@ -0,0 +1,29 @@
+project(kdbgwin)
+
+set(kdbgwin_SRCS
+ common.h
+ main.cpp
+ process.h
+ process.cpp
+ abstract_generator.h
+ abstract_generator.cpp
+ callbacks.h
+ callbacks.cpp
+ outputters.h
+ outputters.cpp
+)
+
+set(COMMON_LIBS ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} dbghelp psapi shlwapi)
+
+if ( MINGW )
+ # FIXME this should be handled in a higher level cmake with proper find
+ # scripts and configuration
+ kde4_add_executable(kdbgwin ${kdbgwin_SRCS} mingw_generator.h mingw_generator.cpp)
+ target_link_libraries(kdbgwin ${COMMON_LIBS} bfd iberty intl z)
+endif ( MINGW )
+if ( MSVC OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
+ kde4_add_executable(kdbgwin ${kdbgwin_SRCS} msvc_generator.h msvc_generator.cpp)
+ target_link_libraries(kdbgwin ${COMMON_LIBS})
+endif ( MSVC OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
+
+install(TARGETS kdbgwin DESTINATION ${LIBEXEC_INSTALL_DIR})
diff --git a/drkonqi/kdbgwin/Doxyfile b/drkonqi/kdbgwin/Doxyfile
new file mode 100644
index 00000000..d583734b
--- /dev/null
+++ b/drkonqi/kdbgwin/Doxyfile
@@ -0,0 +1,286 @@
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = kdbgwin
+PROJECT_NUMBER =
+OUTPUT_DIRECTORY = n:\kde\svn\trunk\KDE\kdebase\runtime\drkonqi\kdbgwin\doc
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = YES
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+EXTENSION_MAPPING =
+BUILTIN_STL_SUPPORT = NO
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+TYPEDEF_HIDES_STRUCT = NO
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = YES
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = YES
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = NO
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+FORCE_LOCAL_INCLUDES = NO
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_MEMBERS_CTORS_1ST = NO
+SORT_GROUP_NAMES = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = NO
+SHOW_FILES = YES
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = n:\kde\svn\trunk\KDE\kdebase\runtime\drkonqi\kdbgwin
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS = *.h
+RECURSIVE = NO
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION = NO
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_TIMESTAMP = NO
+HTML_ALIGN_MEMBERS = YES
+HTML_DYNAMIC_SECTIONS = NO
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+GENERATE_QHP = NO
+QCH_FILE =
+QHP_NAMESPACE = org.doxygen.Project
+QHP_VIRTUAL_FOLDER = doc
+QHP_CUST_FILTER_NAME =
+QHP_CUST_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
+QHG_LOCATION =
+GENERATE_ECLIPSEHELP = NO
+ECLIPSE_DOC_ID = org.doxygen.Project
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+USE_INLINE_TREES = NO
+TREEVIEW_WIDTH = 250
+FORMULA_FONTSIZE = 10
+SEARCHENGINE = YES
+SERVER_BASED_SEARCH = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = NO
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+DOT_FONTNAME = FreeSans
+DOT_FONTSIZE = 10
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 0
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
diff --git a/drkonqi/kdbgwin/abstract_generator.cpp b/drkonqi/kdbgwin/abstract_generator.cpp
new file mode 100644
index 00000000..1fa937be
--- /dev/null
+++ b/drkonqi/kdbgwin/abstract_generator.cpp
@@ -0,0 +1,240 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#include "abstract_generator.h"
+#include "callbacks.h"
+
+#include
+
+AbstractBTGenerator::AbstractBTGenerator(const Process& process)
+ : m_process(process)
+{
+ assert(process.IsValid());
+}
+
+AbstractBTGenerator::~AbstractBTGenerator()
+{
+}
+
+QString AbstractBTGenerator::GetModuleName()
+{
+ IMAGEHLP_MODULE64 module;
+ ZeroMemory(&module, sizeof(module));
+ module.SizeOfStruct = sizeof(IMAGEHLP_MODULE64);
+
+ if (!SymGetModuleInfo64(m_process.GetHandle(), m_currentFrame.AddrPC.Offset, &module))
+ {
+ kError() << "SymGetModuleInfo64 failed: " << GetLastError();
+ return QLatin1String(DEFAULT_MODULE);
+ }
+
+ QStringList list = QString(module.ImageName).split("\\");
+ return list[list.size() - 1];
+}
+
+QString AbstractBTGenerator::GetModulePath()
+{
+ IMAGEHLP_MODULE64 module;
+ ZeroMemory(&module, sizeof(module));
+ module.SizeOfStruct = sizeof(IMAGEHLP_MODULE64);
+
+ if (!SymGetModuleInfo64(m_process.GetHandle(), m_currentFrame.AddrPC.Offset, &module))
+ {
+ kError() << "SymGetModuleInfo64 failed: " << GetLastError();
+ return QLatin1String(DEFAULT_MODULE);
+ }
+
+ return QString(module.ImageName);
+}
+
+void AbstractBTGenerator::Run(HANDLE hThread, bool bFaultingThread)
+{
+ assert(m_process.IsValid());
+ assert(hThread);
+
+ if (!Init())
+ {
+ assert(false);
+ return;
+ }
+
+ //HANDLE hFile = CreateFile(L"C:\\test\\test.dmp", FILE_ALL_ACCESS, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL);
+ //if (!MiniDumpWriteDump(m_process.GetHandle(), m_process.GetId(), hFile,
+ // MiniDumpNormal, NULL, NULL, NULL))
+ //{
+ // HRESULT hres = (HRESULT) GetLastError();
+ // printf("%08X\n\n", hres);
+ //}
+ //SafeCloseHandle(hFile);
+
+ DWORD dw = SuspendThread(hThread);
+ assert(dw != DWORD(-1));
+ if (dw == DWORD(-1))
+ {
+ kError() << "SuspendThread() failed: " << GetLastError();
+ return;
+ }
+
+ CONTEXT context;
+ ZeroMemory(&context, sizeof(context));
+ if (!bFaultingThread)
+ {
+ // if it's not the faulting thread, get its context
+ context.ContextFlags = CONTEXT_FULL;
+ if (!GetThreadContext(hThread, &context))
+ {
+ ResumeThread(hThread);
+ assert(false);
+ kError() << "GetThreadContext() failed: " << GetLastError();
+ return;
+ }
+ }
+ else
+ {
+ // if it is, get it from KCrash
+ HANDLE hMapFile = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, L"Local\\KCrashShared");
+ if (hMapFile == NULL)
+ {
+ kError() << "OpenFileMapping() failed: " << GetLastError();
+ return;
+ }
+ CONTEXT *othercontext = (CONTEXT*) MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(CONTEXT));
+ if (othercontext == NULL)
+ {
+ kError() << "MapViewOfFile() failed: " << GetLastError();
+ SafeCloseHandle(hMapFile);
+ return;
+ }
+ CopyMemory(&context, othercontext, sizeof(CONTEXT));
+ UnmapViewOfFile(othercontext); // continue even if it fails
+ SafeCloseHandle(hMapFile);
+ }
+
+ // some of this stuff is taken from StackWalker
+ ZeroMemory(&m_currentFrame, sizeof(m_currentFrame));
+ DWORD machineType = IMAGE_FILE_MACHINE_UNKNOWN;
+#if defined(_M_IX86)
+ machineType = IMAGE_FILE_MACHINE_I386;
+ m_currentFrame.AddrPC.Offset = context.Eip;
+ m_currentFrame.AddrFrame.Offset = context.Ebp;
+ m_currentFrame.AddrStack.Offset = context.Esp;
+#elif defined(_M_X64)
+ machineType = IMAGE_FILE_MACHINE_AMD64;
+ m_currentFrame.AddrPC.Offset = context.Rip;
+ m_currentFrame.AddrFrame.Offset = context.Rbp;
+ m_currentFrame.AddrStack.Offset = context.Rsp;
+#else
+# error This architecture is not supported.
+#endif
+ m_currentFrame.AddrPC.Mode = AddrModeFlat;
+ m_currentFrame.AddrFrame.Mode = AddrModeFlat;
+ m_currentFrame.AddrStack.Mode = AddrModeFlat;
+
+ SymSetOptions(SymGetOptions() | SYMOPT_UNDNAME | SYMOPT_LOAD_LINES);
+ SymInitialize(m_process.GetHandle(), NULL, FALSE);
+
+ LoadSymbols();
+
+ for (int i = 0; /*nothing*/; i++)
+ {
+ SetLastError(0);
+
+ if (!StackWalk64(
+ machineType,
+ m_process.GetHandle(),
+ hThread,
+ &m_currentFrame,
+ &context,
+ &Callbacks::ReadProcessMemory,
+ &Callbacks::SymFunctionTableAccess64,
+ &Callbacks::SymGetModuleBase64,
+ NULL))
+ {
+ emit Finished();
+ kDebug() << "Stackwalk finished; GetLastError=" << GetLastError();
+ break;
+ }
+
+ FrameChanged();
+
+ QString modulename = GetModuleName();
+ QString functionname = GetFunctionName();
+ QString file = GetFile();
+ int line = GetLine();
+ QString address = QString::number(m_currentFrame.AddrPC.Offset, 16);
+
+ QString debugLine = QString::fromLatin1(BACKTRACE_FORMAT).
+ arg(modulename).arg(functionname).arg(file).arg(line).arg(address);
+
+ emit DebugLine(debugLine);
+ }
+
+ // Resume the target thread now, or else the crashing process will not
+ // be terminated
+ ResumeThread(hThread);
+
+ SymCleanup(m_process.GetHandle());
+}
+
+bool AbstractBTGenerator::IsSymbolLoaded(const QString& module)
+{
+ if (m_symbolsMap.contains(module))
+ {
+ return m_symbolsMap[module];
+ }
+ return false;
+}
+
+void AbstractBTGenerator::LoadSymbols()
+{
+ TModulesMap modules = m_process.GetModules();
+ for (TModulesMap::iterator i = modules.begin(); i != modules.end(); i++)
+ {
+ MODULEINFO modInfo;
+ ZeroMemory(&modInfo, sizeof(modInfo));
+
+ QString strModule = i.key();
+
+ GetModuleInformation(m_process.GetHandle(), i.value(), &modInfo, sizeof(modInfo));
+ SymLoadModuleEx(
+ m_process.GetHandle(),
+ NULL,
+ (CHAR*) i.key().toLatin1().constData(),
+ (CHAR*) i.key().toLatin1().constData(),
+ (DWORD64) modInfo.lpBaseOfDll,
+ modInfo.SizeOfImage,
+ NULL,
+ 0);
+
+ LoadSymbol(strModule, (DWORD64) modInfo.lpBaseOfDll);
+
+ if (!IsSymbolLoaded(strModule))
+ {
+ emit MissingSymbol(strModule);
+ }
+ }
+ emit DebugLine(QString());
+ emit DebugLine(QString());
+}
diff --git a/drkonqi/kdbgwin/abstract_generator.h b/drkonqi/kdbgwin/abstract_generator.h
new file mode 100644
index 00000000..271b6e0d
--- /dev/null
+++ b/drkonqi/kdbgwin/abstract_generator.h
@@ -0,0 +1,121 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#pragma once
+
+#include "common.h"
+#include "process.h"
+
+const static char* BACKTRACE_FORMAT = "%1!%2() [%3 @ %4] at 0x%5";
+// module.dll!KClass::function() [c:\file.cpp @ 10] at 0x0001000
+
+const static char* DEFAULT_MODULE = "[unknown]";
+const static char* DEFAULT_FUNC = "[unknown]";
+const static char* DEFAULT_FILE = "[unknown]";
+const static int DEFAULT_LINE = -1;
+
+/**
+ * \brief Base generator class
+ *
+ * This class gives the definition of a backtrace generator. There are 2 subclasses: one for
+ * MSVC and one for MinGW. The reason why implementation differs is the fact that executables
+ * use different debugging formats: PDBs (for MSVC) and Dwarf-2/Stabs and possibly more I don't
+ * know too much about for MinGW, which are embedded in the executable itself.
+ */
+class AbstractBTGenerator : public QObject
+{
+ Q_OBJECT
+protected:
+ /// A Process instance, corresponding to the process for which we generate the backtrace
+ Process m_process;
+
+ /// The current stack frame. It is kept as a member
+ STACKFRAME64 m_currentFrame;
+
+ /// The definition of a map of symbols
+ typedef QMap TSymbolsMap;
+ /// A map of symbols (the full path to the module, and a bool which specifies if
+ /// symbols were loaded for it)
+ TSymbolsMap m_symbolsMap;
+
+public:
+ /// Constructor
+ AbstractBTGenerator(const Process& process);
+ virtual ~AbstractBTGenerator();
+
+ /// Abstract virtual: Initialize this generator
+ virtual bool Init() = 0;
+
+ /// Abstract virtual: Uninitialize this generator
+ virtual void UnInit() = 0;
+
+ /// Start generating the backtrace
+ virtual void Run(HANDLE hTread, bool bFaultingThread);
+
+ /// This method acts like a callback and will be called when the stack frame changed
+ virtual void FrameChanged() = 0;
+
+ /// Abstract virtual: get current module name
+ /// @return the name of the current module (eg: kdecore.dll)
+ virtual QString GetModuleName();
+
+ /// Abstract virtual: get current module path
+ /// @return the full path to the current module (eg: N:\\kde\\bin\\kdecore.dll)
+ virtual QString GetModulePath();
+
+ /// Abstract virtual: get current function/method name. The name is undecorated internally by this method.
+ /// @return the current function or method (eg: KCmdLineArgs::args)
+ virtual QString GetFunctionName() = 0;
+
+ /// Abstract virtual: get the full path to the current file
+ /// @return the path to the file (eg: N:\\kde\\svn\\KDE\\trunk\\kdelibs\\kcmdlineargs\\kcmdlineargs.cpp)
+ virtual QString GetFile() = 0;
+
+ /// Abstract virtual: get current line
+ /// @return the current line in the file
+ virtual int GetLine() = 0;
+
+ /// Checks if symbols are loaded for the specified module
+ /// @return true if symbols are loaded
+ virtual bool IsSymbolLoaded(const QString& module);
+
+ /// Tries to load symbols for all loaded modules
+ virtual void LoadSymbols();
+
+ /// Tries to load a symbol file for a module loaded at dwBaseAddr
+ virtual void LoadSymbol(const QString& module, DWORD64 dwBaseAddr) = 0;
+signals:
+ /// This will be emitted whenever the generator wishes to output information. It can either be
+ /// module information (in the form: "Loaded C:\path\to.dll (symbols loaded)", a stack frame line,
+ /// or newlines
+ void DebugLine(const QString&);
+
+ /// This signal is emitted when a module is loaded, and its symbols are missing. This is
+ /// caught by the PackageSuggester
+ void MissingSymbol(const QString&);
+
+ /// Will be emitted when the generation finishes
+ void Finished();
+};
diff --git a/drkonqi/kdbgwin/callbacks.cpp b/drkonqi/kdbgwin/callbacks.cpp
new file mode 100644
index 00000000..2d5a1865
--- /dev/null
+++ b/drkonqi/kdbgwin/callbacks.cpp
@@ -0,0 +1,49 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#include "callbacks.h"
+
+BOOL Callbacks::ReadProcessMemory(HANDLE hProcess, DWORD64 qwBaseAddr, PVOID lpBuf, DWORD nSize, LPDWORD lpBytesRead)
+{
+ SIZE_T st;
+ BOOL bRet = ::ReadProcessMemory(hProcess, (LPVOID) qwBaseAddr, (LPVOID) lpBuf, nSize, &st);
+ *lpBytesRead = (DWORD) st;
+ //kDebug() << "bytes read=" << st << "; bRet=" << bRet << "; LastError: " << GetLastError();
+ return bRet;
+}
+
+PVOID Callbacks::SymFunctionTableAccess64(HANDLE hProcess, DWORD64 qwAddr)
+{
+ PVOID ret = ::SymFunctionTableAccess64(hProcess, qwAddr);
+ //kDebug() << "ret=" << ret << "; LastError: " << GetLastError();
+ return ret;
+}
+
+DWORD64 Callbacks::SymGetModuleBase64(HANDLE hProcess, DWORD64 qwAddr)
+{
+ DWORD64 ret = ::SymGetModuleBase64(hProcess, qwAddr);
+ //kDebug() << "ret=" << ret << "; LastError: " << GetLastError();
+ return ret;
+}
diff --git a/drkonqi/kdbgwin/callbacks.h b/drkonqi/kdbgwin/callbacks.h
new file mode 100644
index 00000000..77b71218
--- /dev/null
+++ b/drkonqi/kdbgwin/callbacks.h
@@ -0,0 +1,44 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#pragma once
+
+#include "common.h"
+
+#define KDBGWIN_CALL_TYPE __stdcall
+
+/**
+ * \brief StackWalk64 callbacks.
+ *
+ * This class encapsulates 3 callbacks used by StackWalk64. ReadProcessMemory is the only
+ * one really needed here, but I kept all three for debugging purposes.
+ */
+class Callbacks
+{
+public:
+ static BOOL KDBGWIN_CALL_TYPE ReadProcessMemory(HANDLE, DWORD64, PVOID, DWORD, LPDWORD);
+ static PVOID KDBGWIN_CALL_TYPE SymFunctionTableAccess64(HANDLE, DWORD64);
+ static DWORD64 KDBGWIN_CALL_TYPE SymGetModuleBase64(HANDLE, DWORD64);
+};
diff --git a/drkonqi/kdbgwin/common.h b/drkonqi/kdbgwin/common.h
new file mode 100644
index 00000000..82fc8a6f
--- /dev/null
+++ b/drkonqi/kdbgwin/common.h
@@ -0,0 +1,74 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#pragma once
+
+// the compiler only provides UNICODE. tchar.h checks for the _UNICODE macro
+#if defined(UNICODE)
+#define _UNICODE
+#endif
+
+// first: windows & compiler includes
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+// second: Qt includes
+#include
+#include
+
+
+// third: KDE includes
+#include
+
+
+// common defines
+#define SafeCloseHandle(h) \
+ CloseHandle(h); \
+ h = NULL;
+
+#define ArrayCount(x) (sizeof(x) / sizeof(x[0]))
+
+
+
+
+// Documentation
+/**
+\mainpage KDbgWin
+
+KDbgWin (KDE Debugger for Windows) is a helper application for DrKonqi. Because KDE-Windows supports
+2 compilers (MSVC and MinGW), and there is no debugger that supports them both, a simple debugger was needed
+to make DrKonqi able to generate backtraces - Windows only.
+
+MSVC generates .pdb files for its binaries, and GNU GCC embeds debugging information in executables. However,
+with MinGW, debugging information can be stripped into external files and then loaded on demand. So the only
+difference between the two is how symbols are handled. DbgHelp and LibBfd were used for manipulating and getting
+the required information from each debugging format.
+*/
diff --git a/drkonqi/kdbgwin/main.cpp b/drkonqi/kdbgwin/main.cpp
new file mode 100644
index 00000000..2ca2c689
--- /dev/null
+++ b/drkonqi/kdbgwin/main.cpp
@@ -0,0 +1,79 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#include "msvc_generator.h"
+#include "mingw_generator.h"
+#include "outputters.h"
+#include "process.h"
+#include
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ QCoreApplication::setApplicationName("kdbgwin");
+
+ if (argc != 3)
+ {
+ kFatal() << "Parameters are incorrect";
+ return -1;
+ }
+
+ if (!Process::EnableDebugPrivilege())
+ {
+ kFatal() << "Cannot enable debug privilege, exiting";
+ return -1;
+ }
+
+ // ok, argv[1] is the pid of the failing process,
+ // and argv[2] the current thread id - let's get the info we need
+ Process proc;
+ if (!proc.GetInfo(argv[1], argv[2]))
+ {
+ kFatal() << "Cannot attach to process, exiting";
+ return -1;
+ }
+
+#if defined(Q_CC_MSVC)
+ MsvcGenerator generator(proc);
+#elif defined(Q_CC_GNU)
+ MingwGenerator generator(proc);
+#endif
+
+ Outputter outputter;
+
+ QObject::connect
+ (
+ &generator,
+ SIGNAL(DebugLine(QString)),
+ &outputter,
+ SLOT(OnDebugLine(QString))
+ );
+
+ TThreadsMap::const_iterator it;
+ for (it = proc.GetThreads().constBegin(); it != proc.GetThreads().constEnd(); it++)
+ {
+ generator.Run(it.value(), (it.key() == proc.GetThreadId())? true : false);
+ }
+}
diff --git a/drkonqi/kdbgwin/mingw_generator.cpp b/drkonqi/kdbgwin/mingw_generator.cpp
new file mode 100644
index 00000000..34752268
--- /dev/null
+++ b/drkonqi/kdbgwin/mingw_generator.cpp
@@ -0,0 +1,168 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#include "mingw_generator.h"
+#include
+#include
+
+MingwGenerator::MingwGenerator(const Process& process)
+ : AbstractBTGenerator(process), file(NULL), func(NULL), line(0)
+{}
+
+struct MyBFD
+{
+ QString module;
+ bfd* abfd;
+ asymbol** syms;
+ MyBFD() : abfd(0), syms(0)
+ {}
+ MyBFD(const QString& module, bfd* abfd, asymbol** syms)
+ { this->module = module; this->abfd = abfd; this->syms = syms; }
+ bool operator==(const MyBFD& other)
+ { return module == other.module; }
+};
+
+typedef QList TBFDList;
+TBFDList bfds;
+
+asection* text = NULL;
+
+bool MingwGenerator::Init()
+{
+ bfd_init();
+ return true;
+}
+
+void MingwGenerator::UnInit()
+{
+}
+
+void MingwGenerator::FrameChanged()
+{
+ QString modPath = GetModulePath();
+ bool existsSymbol = false;
+ TSymbolsMap::const_iterator i = m_symbolsMap.find(modPath);
+ if (i == m_symbolsMap.end())
+ {
+ return;
+ }
+ MyBFD dummy(modPath, NULL, NULL);
+ int pos = bfds.indexOf(dummy);
+ if (pos == -1)
+ {
+ return;
+ }
+ MyBFD bfd = bfds[pos];
+ text = bfd_get_section_by_name(bfd.abfd, ".text");
+ long offset = m_currentFrame.AddrPC.Offset - text->vma;
+ file = DEFAULT_FILE;
+ func = DEFAULT_FUNC;
+ line = DEFAULT_LINE;
+ if (offset > 0)
+ {
+ bfd_find_nearest_line(bfd.abfd, text, bfd.syms, offset, &file, &func, (unsigned int*) &line);
+ }
+}
+
+QString MingwGenerator::GetFunctionName()
+{
+ if (func != NULL)
+ {
+ char* realname = abi::__cxa_demangle(func, NULL, NULL, NULL);
+ if (realname != NULL)
+ {
+ QString strReturn = QString::fromLatin1(realname);
+ free(realname);
+ return strReturn;
+ }
+ else
+ {
+ return QString::fromLatin1(func);
+ }
+ }
+ return QString::fromLatin1(DEFAULT_FUNC);
+}
+
+QString MingwGenerator::GetFile()
+{
+ if (file != NULL)
+ {
+ return QString::fromLatin1(file);
+ }
+ return QString::fromLatin1(DEFAULT_FILE);
+}
+
+int MingwGenerator::GetLine()
+{
+ if (line > 0)
+ {
+ return line;
+ }
+ return -1;
+}
+
+void MingwGenerator::LoadSymbol(const QString& module, DWORD64 dwBaseAddr)
+{
+ QString symbolFile = module;
+ symbolFile.truncate(symbolFile.length() - 4);
+ symbolFile.append(".sym");
+
+ m_symbolsMap[module] = false; // default
+ QString symbolType;
+ do
+ {
+ bfd* abfd = bfd_openr(symbolFile.toLatin1(), NULL);
+ if (abfd == NULL)
+ {
+ symbolType = QString::fromLatin1("no symbols loaded");
+ break;
+ }
+ bfd_check_format(abfd, bfd_object);
+ unsigned storage_needed = bfd_get_symtab_upper_bound(abfd);
+ assert(storage_needed > 4);
+ if (storage_needed <= 4)
+ {
+ // i don't know why the minimum value for this var is 4...
+ symbolType = QString::fromLatin1("no symbols loaded");
+ break;
+ }
+ asymbol** syms = (asymbol **) malloc(storage_needed);
+ assert(syms);
+ if (syms == NULL)
+ {
+ symbolType = QString::fromLatin1("no symbols loaded");
+ break;
+ }
+ symbolType = QString::fromLatin1("symbols loaded");
+ m_symbolsMap[module] = true;
+
+ bfds.push_back(MyBFD(module, abfd, syms));
+ }
+ while (0);
+
+ QString strOutput = QString::fromLatin1("Loaded %1 (%2)")
+ .arg(module).arg(symbolType);
+ emit DebugLine(strOutput);
+}
diff --git a/drkonqi/kdbgwin/mingw_generator.h b/drkonqi/kdbgwin/mingw_generator.h
new file mode 100644
index 00000000..a232b672
--- /dev/null
+++ b/drkonqi/kdbgwin/mingw_generator.h
@@ -0,0 +1,62 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#pragma once
+
+#include "abstract_generator.h"
+
+/**
+ * \brief Generator for MinGW.
+ *
+ * This class allows generating backtraces for executables created with the MinGW compiler.
+ * It assumes that symbols are stored in .sym files in the same directory as the corresponding
+ * binary (eg. N:\\kde\\bin\\libkdecore.dll and N:\\kde\\bin\\libkdecore.sym). It uses libbfd to
+ * find and extract the information it needs from the symbols it loads.
+ */
+class MingwGenerator : public AbstractBTGenerator
+{
+ Q_OBJECT
+protected:
+ /// The current file
+ const char* file;
+ /// The current function
+ const char* func;
+ /// The current line
+ int line;
+public:
+ /// Constructor
+ MingwGenerator(const Process& process);
+
+ virtual bool Init();
+ virtual void UnInit();
+
+ virtual void FrameChanged();
+
+ virtual QString GetFunctionName();
+ virtual QString GetFile();
+ virtual int GetLine();
+
+ virtual void LoadSymbol(const QString& module, DWORD64 dwBaseAddr);
+};
diff --git a/drkonqi/kdbgwin/msvc_generator.cpp b/drkonqi/kdbgwin/msvc_generator.cpp
new file mode 100644
index 00000000..7d72c12e
--- /dev/null
+++ b/drkonqi/kdbgwin/msvc_generator.cpp
@@ -0,0 +1,139 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#include "msvc_generator.h"
+
+MsvcGenerator::MsvcGenerator(const Process& process)
+ : AbstractBTGenerator(process)
+{}
+
+bool MsvcGenerator::Init()
+{
+ return true;
+}
+
+void MsvcGenerator::UnInit()
+{
+}
+
+QString MsvcGenerator::GetFunctionName()
+{
+ PSYMBOL_INFO symbol =
+ (PSYMBOL_INFO) malloc(sizeof(SYMBOL_INFO) + MAX_SYMBOL_NAME);
+ ZeroMemory(symbol, sizeof(symbol) + MAX_SYMBOL_NAME);
+ symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
+ symbol->MaxNameLen = MAX_SYMBOL_NAME;
+
+ DWORD64 dwDisplacement = 0;
+
+ if (!SymFromAddr(m_process.GetHandle(), m_currentFrame.AddrPC.Offset, &dwDisplacement, symbol))
+ {
+ kError() << "SymFromAddr() failed: " << GetLastError();
+ return QString::fromLatin1(DEFAULT_FUNC);
+ }
+
+ char undecoratedName[MAX_PATH] = {0};
+ if (!UnDecorateSymbolName(symbol->Name, undecoratedName, MAX_PATH, UNDNAME_COMPLETE))
+ {
+ // if this fails, show the decorated name anyway, don't fail
+ kError() << "UnDecorateSymbolName() failed: " << GetLastError();
+ return QString::fromLatin1(symbol->Name);
+ }
+
+ return QString::fromLatin1(undecoratedName);
+}
+
+QString MsvcGenerator::GetFile()
+{
+ IMAGEHLP_LINE64 line;
+ ZeroMemory(&line, sizeof(line));
+ line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
+ DWORD dwDisplacement = 0;
+
+ if (!SymGetLineFromAddr64(m_process.GetHandle(), m_currentFrame.AddrPC.Offset, &dwDisplacement, &line))
+ {
+ kError() << "SymGetLineFromAddr64 failed: " << GetLastError();
+ return QString::fromLatin1(DEFAULT_FILE);
+ }
+
+ return QString(line.FileName);
+}
+
+int MsvcGenerator::GetLine()
+{
+ IMAGEHLP_LINE64 line;
+ ZeroMemory(&line, sizeof(line));
+ line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
+ DWORD dwDisplacement = 0;
+
+ if (!SymGetLineFromAddr64(m_process.GetHandle(), m_currentFrame.AddrPC.Offset, &dwDisplacement, &line))
+ {
+ //kError() << "SymGetLineFromAddr64 failed: " << GetLastError();
+ return DEFAULT_LINE;
+ }
+
+ return (int) line.LineNumber;
+}
+
+void MsvcGenerator::LoadSymbol(const QString& module, DWORD64 dwBaseAddr)
+{
+ QString strOutput;
+
+ IMAGEHLP_MODULE64 moduleInfo;
+ ZeroMemory(&moduleInfo, sizeof(moduleInfo));
+ moduleInfo.SizeOfStruct = sizeof(moduleInfo);
+ SymGetModuleInfo64(m_process.GetHandle(), dwBaseAddr, &moduleInfo);
+
+ m_symbolsMap[module] = false; // default
+ QString symbolType;
+ switch (moduleInfo.SymType)
+ {
+ case SymNone:
+ symbolType = QString::fromLatin1("no symbols loaded");
+ break;
+ case SymCoff:
+ case SymCv:
+ case SymPdb:
+ case SymSym:
+ case SymDia:
+ symbolType = QString::fromLatin1("symbols loaded");
+ m_symbolsMap[module] = true;
+ break;
+ case SymExport:
+ symbolType = QString::fromLatin1("export table only");
+ break;
+ case SymDeferred:
+ symbolType = QString::fromLatin1("deferred (not loaded currently)");
+ break;
+ case SymVirtual:
+ symbolType = QString::fromLatin1("virtual");
+ break;
+ }
+
+ strOutput = QString::fromLatin1("Loaded %1 (%2)")
+ .arg(module).arg(symbolType);
+
+ emit DebugLine(strOutput);
+}
diff --git a/drkonqi/kdbgwin/msvc_generator.h b/drkonqi/kdbgwin/msvc_generator.h
new file mode 100644
index 00000000..acdefc35
--- /dev/null
+++ b/drkonqi/kdbgwin/msvc_generator.h
@@ -0,0 +1,58 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#pragma once
+
+#include "abstract_generator.h"
+
+const static DWORD MAX_SYMBOL_NAME = 256 * sizeof(TCHAR);
+
+/**
+ * \brief Generator for MSVC.
+ *
+ * This class implements a backtrace generator for executables created with Microsoft's
+ * Visual C++. The fundamental difference of executables created with MSVC and MinGW is
+ * the debugging format. MSVC uses a proprietary debugging format called PDB (Program
+ * Database), which can be manipulated with DbgHelp API.
+ *
+ */
+class MsvcGenerator : public AbstractBTGenerator
+{
+ Q_OBJECT
+public:
+ /// Constructor
+ MsvcGenerator(const Process& process);
+
+ virtual bool Init();
+ virtual void UnInit();
+
+ virtual void FrameChanged() {};
+
+ virtual QString GetFunctionName();
+ virtual QString GetFile();
+ virtual int GetLine();
+
+ virtual void LoadSymbol(const QString& module, DWORD64 dwBaseAddr);
+};
diff --git a/drkonqi/kdbgwin/outputters.cpp b/drkonqi/kdbgwin/outputters.cpp
new file mode 100644
index 00000000..bff788f0
--- /dev/null
+++ b/drkonqi/kdbgwin/outputters.cpp
@@ -0,0 +1,35 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#include "outputters.h"
+
+Outputter::Outputter() : stream(stdout)
+{
+}
+
+void Outputter::OnDebugLine(const QString& line)
+{
+ stream << line << '\n';
+}
diff --git a/drkonqi/kdbgwin/outputters.h b/drkonqi/kdbgwin/outputters.h
new file mode 100644
index 00000000..02fc37c5
--- /dev/null
+++ b/drkonqi/kdbgwin/outputters.h
@@ -0,0 +1,50 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#pragma once
+
+#include "common.h"
+#include
+
+/**
+ * \brief Basic outputter.
+ *
+ * This class will output the information from a backtrace generator.
+ */
+class Outputter : public QObject
+{
+ Q_OBJECT
+
+protected:
+ QTextStream stream;
+
+public:
+ Outputter();
+
+public slots:
+ /// The slot that will be called for each line emitted by the generator. This method
+ /// sends the string to stdout and kDebug()
+ void OnDebugLine(const QString&);
+};
diff --git a/drkonqi/kdbgwin/process.cpp b/drkonqi/kdbgwin/process.cpp
new file mode 100644
index 00000000..ad6bfd2d
--- /dev/null
+++ b/drkonqi/kdbgwin/process.cpp
@@ -0,0 +1,181 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#include "common.h"
+#include "process.h"
+
+Process::Process()
+ : m_bValid(FALSE)
+{
+}
+
+// we need debug privileges to open the proces with PROCESS_ALL_ACCESS, and
+// to successfully use ReadProcessMemory()
+BOOL Process::EnableDebugPrivilege()
+{
+ kDebug() << "Enabling debug privilege";
+ HANDLE hToken = NULL;
+
+ if (!OpenThreadToken(GetCurrentThread(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, FALSE, &hToken))
+ {
+ if (GetLastError() == ERROR_NO_TOKEN)
+ {
+ if (!ImpersonateSelf(SecurityImpersonation))
+ {
+ kError() << "ImpersonateSelf() failed: " << GetLastError();
+ return FALSE;
+ }
+ if (!OpenThreadToken(GetCurrentThread(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, FALSE, &hToken))
+ {
+ kError() << "OpenThreadToken() #2 failed: " << GetLastError();
+ return FALSE;
+ }
+ }
+ else
+ {
+ kError() << "OpenThreadToken() #1 failed: " << GetLastError();
+ return FALSE;
+ }
+ }
+
+ LUID luid;
+ if (!LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &luid))
+ {
+ assert(false);
+ kError() << "Cannot lookup privilege: " << GetLastError();
+ SafeCloseHandle(hToken);
+ return FALSE;
+ }
+
+ TOKEN_PRIVILEGES tp;
+ tp.PrivilegeCount = 1;
+ tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+ tp.Privileges[0].Luid = luid;
+
+ if (!AdjustTokenPrivileges(hToken, FALSE, &tp, NULL, (PTOKEN_PRIVILEGES) NULL, (PDWORD) NULL))
+ {
+ assert(false);
+ kError() << "Cannot adjust privilege: " << GetLastError();
+ SafeCloseHandle(hToken);
+ return FALSE;
+ }
+
+ SafeCloseHandle(hToken);
+ return TRUE;
+}
+
+BOOL Process::GetInfo(const char* pid, const char* threadId)
+{
+ kDebug() << "Trying to get info about pid=" << pid;
+
+ DWORD dwPid = DWORD(atoi(pid));
+ DWORD dwThread = DWORD(atoi(threadId));
+
+ // get handle to the process
+ HANDLE hProcess = NULL;
+ hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPid);
+ assert(hProcess);
+ if (hProcess == NULL)
+ {
+ kError() << "Cannot open process " << dwPid << ": " << GetLastError();
+ return m_bValid;
+ }
+ m_dwPid = dwPid;
+ m_hProcess = hProcess;
+ m_dwThread = dwThread;
+
+ TCHAR procPath[MAX_PATH * 2 + 1] = {0};
+ GetModuleFileNameEx(hProcess, NULL, procPath, MAX_PATH*2 + 1);
+ m_path = QString::fromWCharArray(procPath);
+
+ // we can't get the threads for a single process, so get all system's
+ // threads, and enumerate through them
+ HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, NULL);
+ if (hSnapshot == INVALID_HANDLE_VALUE)
+ {
+ kError() << "CreateToolhelp32Snapshot() failed: " << GetLastError();
+ assert(false);
+ return m_bValid;
+ }
+
+ // get process threads
+ THREADENTRY32 te;
+ ZeroMemory(&te, sizeof(te));
+ te.dwSize = sizeof(te);
+ if (Thread32First(hSnapshot, &te))
+ {
+ do
+ {
+ if (te.th32OwnerProcessID == dwPid)
+ {
+ kDebug() << "Found thread " << te.th32ThreadID << ", adding to list";
+
+ HANDLE hThread = NULL;
+ hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, te.th32ThreadID);
+ assert(hThread);
+ if (hThread == NULL)
+ {
+ kError() << "Cannot open thread " << te.th32ThreadID << ": " << GetLastError();
+ continue;
+ }
+
+ m_threads[te.th32ThreadID] = hThread;
+ // we have at least 1 thread, make this valid
+ m_bValid = TRUE;
+ }
+ }
+ while (Thread32Next(hSnapshot, &te));
+ }
+ SafeCloseHandle(hSnapshot);
+
+ assert(m_threads.size() > 0);
+
+ // get process modules
+ HMODULE hMods[1024];
+ DWORD cbNeeded = 0;
+ if (!EnumProcessModules(hProcess, hMods, ArrayCount(hMods), &cbNeeded))
+ {
+ kError() << "Cannot enumerate modules: " << GetLastError();
+ return m_bValid;
+ }
+ for (size_t i = 0; i < (cbNeeded / sizeof(hMods[0])); i++)
+ {
+ /*
+ * In Windows, a wchar_t has 2 bytes; GCC defines wchar_t as int,
+ * which is 4 bytes; so i can't use TCHAR here; better off using ushort
+ * and casting when necessary
+ */
+ ushort szModName[MAX_PATH];
+ if (GetModuleFileNameEx(hProcess, hMods[i], (LPTSTR) szModName, MAX_PATH))
+ {
+ //QString str = QString::fromUtf16(szModName);
+ //kDebug() << "Got module: " << str;
+ //m_modules.push_back(QString::fromUtf16(szModName));
+ m_modules[QString::fromUtf16(szModName)] = hMods[i];
+ }
+ }
+
+ return m_bValid;
+}
diff --git a/drkonqi/kdbgwin/process.h b/drkonqi/kdbgwin/process.h
new file mode 100644
index 00000000..ff5d1572
--- /dev/null
+++ b/drkonqi/kdbgwin/process.h
@@ -0,0 +1,107 @@
+/******************************************************************
+ *
+ * kdbgwin - Helper application for DrKonqi
+ *
+ * This file is part of the KDE project
+ *
+ * Copyright (C) 2010 Ilie Halip
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ *****************************************************************/
+
+#pragma once
+
+#include "common.h"
+
+typedef QMap TThreadsMap;
+typedef QMap TModulesMap;
+
+/**
+ * \brief Describes a process.
+ *
+ * This is a helper class when dealing with another process. When kdbgwin starts,
+ * it attaches to the crashing process and tries to retrieve useful information:
+ * pid, threads, modules, image path. These will be used later.
+ */
+class Process
+{
+private:
+ /// Flag to check if the information about this process is valid and can be used
+ BOOL m_bValid;
+
+ /// Process ID
+ DWORD m_dwPid;
+
+ /// Failing thread ID - I need this because for the crashing thread, I need to get
+ /// the CONTEXT from a piece of shared memory in KCrash
+ DWORD m_dwThread;
+
+ /// A handle to the process
+ HANDLE m_hProcess;
+
+ /// A QMap which associates thread IDs with opened handles for each
+ /// of them
+ TThreadsMap m_threads;
+
+ /// The full path to the executable file which started this process
+ QString m_path;
+
+ /// A QMap which contains the paths to the loaded modules and
+ /// handles to each of them
+ TModulesMap m_modules;
+
+public:
+ Process();
+
+public:
+ /// kdbgwin needs to enable the debug privilege in order to read from
+ /// another process's memory.
+ static BOOL EnableDebugPrivilege();
+
+public:
+ /// Attaches to the process and gets all required information
+ /// @return TRUE if operation succeeds
+ BOOL GetInfo(const char* pid, const char* threadId);
+
+ /// Checks if the information is valid
+ BOOL IsValid() const
+ { assert(m_bValid); return m_bValid; }
+
+ /// Get the process ID
+ DWORD GetId() const
+ { assert(m_dwPid); return m_dwPid; }
+
+ /// Returns an open handle to the process (opened with PROCESS_ALL_ACCESS)
+ HANDLE GetHandle() const
+ { assert(m_hProcess); return m_hProcess; }
+
+ /// Returns the thread ID of the thread that caused the exception
+ DWORD GetThreadId() const
+ { assert(m_dwThread); return m_dwThread; }
+
+ /// Returns the threads map
+ const TThreadsMap& GetThreads() const
+ { return m_threads; }
+
+ /// Returns the full path to the executable on the disk
+ const QString& GetPath() const
+ { return m_path; }
+
+ /// Returns a map of all the loaded modules
+ const TModulesMap& GetModules() const
+ { return m_modules; }
+};
diff --git a/drkonqi/main.cpp b/drkonqi/main.cpp
new file mode 100644
index 00000000..4deed2c9
--- /dev/null
+++ b/drkonqi/main.cpp
@@ -0,0 +1,121 @@
+/*****************************************************************
+ * drkonqi - The KDE Crash Handler
+ *
+ * Copyright (C) 2000-2003 Hans Petter Bieker
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *****************************************************************/
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include "drkonqi.h"
+#include "drkonqidialog.h"
+
+static const char version[] = "2.1.5";
+static const char description[] = I18N_NOOP("The KDE Crash Handler gives the user feedback "
+ "if a program has crashed.");
+
+int main(int argc, char* argv[])
+{
+#ifndef Q_OS_WIN //krazy:exclude=cpp
+// TODO - Investigate and fix this, or work around it as follows...
+// #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
+// When starting Dr Konqi via kdeinit4, Apple OS X aborts us unconditionally for
+// using setgid/setuid, even if the privs were those of the logged-in user.
+// Drop privs.
+ setgid(getgid());
+ if (setuid(getuid()) < 0 && geteuid() != getuid()) {
+ exit(255);
+ }
+#endif
+
+ // Prevent KApplication from setting the crash handler. We will set it later...
+ setenv("KDE_DEBUG", "true", 1);
+ // Session management is not needed, do not even connect in order to survive longer than ksmserver.
+ unsetenv("SESSION_MANAGER");
+
+ KAboutData aboutData("drkonqi", 0, ki18n("The KDE Crash Handler"),
+ version, ki18n(description),
+ KAboutData::License_GPL,
+ ki18n("(C) 2000-2009, The DrKonqi Authors"));
+ aboutData.addAuthor(ki18nc("@info:credit","Hans Petter Bieker"), KLocalizedString(),
+ "bieker@kde.org");
+ aboutData.addAuthor(ki18nc("@info:credit","Dario Andres Rodriguez"), KLocalizedString(),
+ "andresbajotierra@gmail.com");
+ aboutData.addAuthor(ki18nc("@info:credit","George Kiagiadakis"), KLocalizedString(),
+ "gkiagia@users.sourceforge.net");
+ aboutData.addAuthor(ki18nc("@info:credit","A. L. Spehr"), KLocalizedString(),
+ "spehr@kde.org");
+ aboutData.setProgramIconName("tools-report-bug");
+
+ KCmdLineArgs::init(argc, argv, &aboutData);
+
+ KCmdLineOptions options;
+ options.add("signal ", ki18nc("@info:shell","The signal number that was caught"));
+ options.add("appname ", ki18nc("@info:shell","Name of the program"));
+ options.add("apppath ", ki18nc("@info:shell","Path to the executable"));
+ options.add("appversion ", ki18nc("@info:shell","The version of the program"));
+ options.add("bugaddress ", ki18nc("@info:shell","The bug address to use"));
+ options.add("programname ", ki18nc("@info:shell","Translated name of the program"));
+ options.add("pid ", ki18nc("@info:shell","The PID of the program"));
+ options.add("startupid ", ki18nc("@info:shell","Startup ID of the program"));
+ options.add("kdeinit", ki18nc("@info:shell","The program was started by kdeinit"));
+ options.add("safer", ki18nc("@info:shell","Disable arbitrary disk access"));
+ options.add("restarted", ki18nc("@info:shell","The program has already been restarted"));
+ options.add("keeprunning", ki18nc("@info:shell","Keep the program running and generate "
+ "the backtrace at startup"));
+ options.add("thread ", ki18nc("@info:shell","The thread id of the failing thread"));
+ KCmdLineArgs::addCmdLineOptions(options);
+
+ KComponentData inst(KCmdLineArgs::aboutData());
+ QApplication *qa =
+ KCmdLineArgs::parsedArgs()->isSet("safer") ?
+ new QApplication(KCmdLineArgs::qtArgc(), KCmdLineArgs::qtArgv()) :
+ new KApplication;
+ qa->setApplicationName(inst.componentName());
+
+ if (!DrKonqi::init()) {
+ delete qa;
+ return 1;
+ }
+
+ qa->setQuitOnLastWindowClosed(false);
+ KGlobal::setAllowQuit(true);
+
+ DrKonqiDialog *w = new DrKonqiDialog();
+ w->show();
+ // Make sure the Dr Konqi dialog comes to the front, whatever the platform
+ // or window manager, but especially on Apple OS X.
+ w->raise();
+ int ret = qa->exec();
+
+ DrKonqi::cleanup();
+ delete qa;
+ return ret;
+}
diff --git a/drkonqi/parser/CMakeLists.txt b/drkonqi/parser/CMakeLists.txt
new file mode 100644
index 00000000..d08d0d7f
--- /dev/null
+++ b/drkonqi/parser/CMakeLists.txt
@@ -0,0 +1,9 @@
+set(BACKTRACEPARSER_SRCS
+ backtraceparser.cpp
+ backtraceparsergdb.cpp
+ backtraceparserkdbgwin.cpp
+ backtraceparsernull.cpp
+)
+
+kde4_add_library(drkonqi_backtrace_parser STATIC ${BACKTRACEPARSER_SRCS})
+target_link_libraries(drkonqi_backtrace_parser ${KDE4_KDECORE_LIBS})
diff --git a/drkonqi/parser/backtraceline.h b/drkonqi/parser/backtraceline.h
new file mode 100644
index 00000000..672faeed
--- /dev/null
+++ b/drkonqi/parser/backtraceline.h
@@ -0,0 +1,96 @@
+/*
+ Copyright (C) 2009-2010 George Kiagiadakis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+#ifndef BACKTRACELINE_H
+#define BACKTRACELINE_H
+
+#include
+#include
+
+class BacktraceLine
+{
+public:
+ enum LineType {
+ Unknown, //unknown type. the default
+ EmptyLine, //line is empty
+ Crap, //line is gdb's crap (like "(no debugging symbols found)",
+ //"[New Thread 0x4275c950 (LWP 11931)]", etc...)
+ KCrash, //line is "[KCrash Handler]"
+ ThreadIndicator, //line indicates the current thread,
+ //ex. "[Current thread is 0 (process 11313)]"
+ ThreadStart, //line indicates the start of a thread's stack.
+ SignalHandlerStart, //line indicates the signal handler start
+ //(contains "")
+ StackFrame //line is a normal stack frame
+ };
+
+ enum LineRating {
+ /* RATING -- EXAMPLE */
+ MissingEverything = 0, // #0 0x0000dead in ?? ()
+ MissingFunction = 1, // #0 0x0000dead in ?? () from /usr/lib/libfoobar.so.4
+ MissingLibrary = 2, // #0 0x0000dead in foobar()
+ MissingSourceFile = 3, // #0 0x0000dead in FooBar::FooBar () from /usr/lib/libfoobar.so.4
+ Good = 4, // #0 0x0000dead in FooBar::crash (this=0x0) at /home/user/foobar.cpp:204
+ InvalidRating = -1 // (dummy invalid value)
+ };
+
+ static const LineRating BestRating = Good;
+
+ BacktraceLine() : d(new Data) {}
+
+ QString toString() const {
+ return d->m_line;
+ }
+ LineType type() const {
+ return d->m_type;
+ }
+ LineRating rating() const {
+ return d->m_rating;
+ }
+
+ int frameNumber() const {
+ return d->m_stackFrameNumber;
+ }
+ QString functionName() const {
+ return d->m_functionName;
+ }
+ QString fileName() const {
+ return d->m_file;
+ }
+ QString libraryName() const {
+ return d->m_library;
+ }
+
+protected:
+ class Data : public QSharedData
+ {
+ public:
+ Data() : m_type(Unknown), m_rating(InvalidRating),
+ m_stackFrameNumber(-1) {}
+
+ QString m_line;
+ LineType m_type;
+ LineRating m_rating;
+ int m_stackFrameNumber;
+ QString m_functionName;
+ QString m_file;
+ QString m_library;
+ };
+ QExplicitlySharedDataPointer d;
+};
+
+#endif // BACKTRACELINE_H
diff --git a/drkonqi/parser/backtraceparser.cpp b/drkonqi/parser/backtraceparser.cpp
new file mode 100644
index 00000000..7f62c979
--- /dev/null
+++ b/drkonqi/parser/backtraceparser.cpp
@@ -0,0 +1,394 @@
+/*
+ Copyright (C) 2009-2010 George Kiagiadakis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+#include "backtraceparser_p.h"
+#include "backtraceparsergdb.h"
+#include "backtraceparserkdbgwin.h"
+#include "backtraceparsernull.h"
+#include
+#include
+#include
+
+//factory
+BacktraceParser *BacktraceParser::newParser(const QString & debuggerName, QObject *parent)
+{
+ if (debuggerName == "gdb") {
+ return new BacktraceParserGdb(parent);
+ } else if (debuggerName == "kdbgwin") {
+ return new BacktraceParserKdbgwin(parent);
+ } else {
+ return new BacktraceParserNull(parent);
+ }
+}
+
+BacktraceParser::BacktraceParser(QObject *parent) : QObject(parent), d_ptr(NULL) {}
+BacktraceParser::~BacktraceParser() { delete d_ptr; }
+
+void BacktraceParser::connectToGenerator(QObject *generator)
+{
+ connect(generator, SIGNAL(starting()), this, SLOT(resetState()));
+ connect(generator, SIGNAL(newLine(QString)), this, SLOT(newLine(QString)));
+}
+
+QString BacktraceParser::parsedBacktrace() const
+{
+ Q_D(const BacktraceParser);
+
+ QString result;
+ if (d) {
+ QList::const_iterator i;
+ for (i = d->m_linesList.constBegin(); i != d->m_linesList.constEnd(); ++i) {
+ result += i->toString();
+ }
+ }
+ return result;
+}
+
+QList BacktraceParser::parsedBacktraceLines() const
+{
+ Q_D(const BacktraceParser);
+ return d ? d->m_linesList : QList();
+}
+
+QString BacktraceParser::simplifiedBacktrace() const
+{
+ Q_D(const BacktraceParser);
+
+ //if there is no cached usefulness, the data calculation function has not run yet.
+ if (d && d->m_usefulness == InvalidUsefulness) {
+ const_cast(this)->calculateRatingData();
+ }
+
+ //if there is no d, the debugger has not run yet, so we have no backtrace.
+ return d ? d->m_simplifiedBacktrace : QString();
+}
+
+BacktraceParser::Usefulness BacktraceParser::backtraceUsefulness() const
+{
+ Q_D(const BacktraceParser);
+
+ //if there is no cached usefulness, the data calculation function has not run yet.
+ if (d && d->m_usefulness == InvalidUsefulness) {
+ const_cast(this)->calculateRatingData();
+ }
+
+ //if there is no d, the debugger has not run yet,
+ //so we can say that the (inexistent) backtrace is Useless.
+ return d ? d->m_usefulness : Useless;
+}
+
+QStringList BacktraceParser::firstValidFunctions() const
+{
+ Q_D(const BacktraceParser);
+
+ //if there is no cached usefulness, the data calculation function has not run yet.
+ if (d && d->m_usefulness == InvalidUsefulness) {
+ const_cast(this)->calculateRatingData();
+ }
+
+ //if there is no d, the debugger has not run yet, so we have no functions to return.
+ return d ? d->m_firstUsefulFunctions : QStringList();
+}
+
+
+QSet BacktraceParser::librariesWithMissingDebugSymbols() const
+{
+ Q_D(const BacktraceParser);
+
+ //if there is no cached usefulness, the data calculation function has not run yet.
+ if (d && d->m_usefulness == InvalidUsefulness) {
+ const_cast(this)->calculateRatingData();
+ }
+
+ //if there is no d, the debugger has not run yet, so we have no libraries.
+ return d ? d->m_librariesWithMissingDebugSymbols : QSet();
+}
+
+void BacktraceParser::resetState()
+{
+ //reset the state of the parser by getting a new instance of Private
+ delete d_ptr;
+ d_ptr = constructPrivate();
+}
+
+BacktraceParserPrivate *BacktraceParser::constructPrivate() const
+{
+ return new BacktraceParserPrivate;
+}
+
+
+/* This function returns true if the given stack frame line is the base of the backtrace
+ and thus the parser should not rate any frames below that one. */
+static bool lineIsStackBase(const BacktraceLine & line)
+{
+ //optimization. if there is no function name, do not bother to check it
+ if ( line.rating() == BacktraceLine::MissingEverything
+ || line.rating() == BacktraceLine::MissingFunction )
+ return false;
+
+ //this is the base frame for all threads except the main thread
+ //FIXME that probably works only on linux
+ if ( line.functionName() == "start_thread" )
+ return true;
+
+ QRegExp regExp;
+ regExp.setPattern("(kde)?main"); //main() or kdemain() is the base for the main thread
+ if ( regExp.exactMatch(line.functionName()) )
+ return true;
+
+ //HACK for better rating. we ignore all stack frames below any function that matches
+ //the following regular expression. The functions that match this expression are usually
+ //"QApplicationPrivate::notify_helper", "QApplication::notify" and similar, which
+ //are used to send any kind of event to the Qt application. All stack frames below this,
+ //with or without debug symbols, are useless to KDE developers, so we ignore them.
+ regExp.setPattern("(Q|K)(Core)?Application(Private)?::notify.*");
+ if ( regExp.exactMatch(line.functionName()) )
+ return true;
+
+ //attempt to recognize crashes that happen after main has returned (bug 200993)
+ if ( line.functionName() == "~KCleanUpGlobalStatic" ||
+ line.functionName() == "~QGlobalStatic" ||
+ line.functionName() == "exit" ||
+ line.functionName() == "*__GI_exit" )
+ return true;
+
+ return false;
+}
+
+/* This function returns true if the given stack frame line is the top of the bactrace
+ and thus the parser should not rate any frames above that one. This is used to avoid
+ rating the stack frames of abort(), assert(), Q_ASSERT() and qFatal() */
+static bool lineIsStackTop(const BacktraceLine & line)
+{
+ //optimization. if there is no function name, do not bother to check it
+ if ( line.rating() == BacktraceLine::MissingEverything
+ || line.rating() == BacktraceLine::MissingFunction )
+ return false;
+
+ if ( line.functionName().startsWith(QLatin1String("qt_assert")) //qt_assert and qt_assert_x
+ || line.functionName() == "qFatal"
+ || line.functionName() == "abort"
+ || line.functionName() == "*__GI_abort"
+ || line.functionName() == "*__GI___assert_fail" )
+ return true;
+
+ return false;
+}
+
+/* This function returns true if the given stack frame line should be ignored from rating
+ for some reason. Currently it ignores all libc/libstdc++/libpthread functions. */
+static bool lineShouldBeIgnored(const BacktraceLine & line)
+{
+ if ( line.libraryName().contains("libc.so")
+ || line.libraryName().contains("libstdc++.so")
+ || line.functionName().startsWith(QLatin1String("*__GI_")) //glibc2.9 uses *__GI_ as prefix
+ || line.libraryName().contains("libpthread.so")
+ || line.libraryName().contains("libglib-2.0.so")
+ || line.libraryName().contains("ntdll.dll")
+ || line.libraryName().contains("kernel32.dll")
+ || line.functionName().contains("_tmain")
+ || line.functionName() == QLatin1String("WinMain") )
+ return true;
+
+ return false;
+}
+
+static bool isFunctionUseful(const BacktraceLine & line)
+{
+ //We need the function name
+ if ( line.rating() == BacktraceLine::MissingEverything
+ || line.rating() == BacktraceLine::MissingFunction ) {
+ return false;
+ }
+
+ //Misc ignores
+ if ( line.functionName() == "__kernel_vsyscall"
+ || line.functionName() == "raise"
+ || line.functionName() == "abort"
+ || line.functionName() == "__libc_message"
+ || line.functionName() == "thr_kill" /* *BSD */) {
+ return false;
+ }
+
+ //Ignore core Qt functions
+ //(QObject can be useful in some cases)
+ if ( line.functionName().startsWith(QLatin1String("QBasicAtomicInt::"))
+ || line.functionName().startsWith(QLatin1String("QBasicAtomicPointer::"))
+ || line.functionName().startsWith(QLatin1String("QAtomicInt::"))
+ || line.functionName().startsWith(QLatin1String("QAtomicPointer::"))
+ || line.functionName().startsWith(QLatin1String("QMetaObject::"))
+ || line.functionName().startsWith(QLatin1String("QPointer::"))
+ || line.functionName().startsWith(QLatin1String("QWeakPointer::"))
+ || line.functionName().startsWith(QLatin1String("QSharedPointer::"))
+ || line.functionName().startsWith(QLatin1String("QScopedPointer::"))
+ || line.functionName().startsWith(QLatin1String("QMetaCallEvent::")) ) {
+ return false;
+ }
+
+ //Ignore core Qt containers misc functions
+ if ( line.functionName().endsWith(QLatin1String("detach"))
+ || line.functionName().endsWith(QLatin1String("detach_helper"))
+ || line.functionName().endsWith(QLatin1String("node_create"))
+ || line.functionName().endsWith(QLatin1String("deref"))
+ || line.functionName().endsWith(QLatin1String("ref"))
+ || line.functionName().endsWith(QLatin1String("node_copy"))
+ || line.functionName().endsWith(QLatin1String("d_func")) ) {
+ return false;
+ }
+
+ //Misc Qt stuff
+ if ( line.functionName() == "qt_message_output"
+ || line.functionName() == "qt_message"
+ || line.functionName() == "qFatal"
+ || line.functionName().startsWith(QLatin1String("qGetPtrHelper"))
+ || line.functionName().startsWith(QLatin1String("qt_meta_")) ) {
+ return false;
+ }
+
+ return true;
+}
+
+static bool isFunctionUsefulForSearch(const BacktraceLine & line)
+{
+ //Ignore Qt containers (and iterators Q*Iterator)
+ if ( line.functionName().startsWith(QLatin1String("QList"))
+ || line.functionName().startsWith(QLatin1String("QLinkedList"))
+ || line.functionName().startsWith(QLatin1String("QVector"))
+ || line.functionName().startsWith(QLatin1String("QStack"))
+ || line.functionName().startsWith(QLatin1String("QQueue"))
+ || line.functionName().startsWith(QLatin1String("QSet"))
+ || line.functionName().startsWith(QLatin1String("QMap"))
+ || line.functionName().startsWith(QLatin1String("QMultiMap"))
+ || line.functionName().startsWith(QLatin1String("QMapData"))
+ || line.functionName().startsWith(QLatin1String("QHash"))
+ || line.functionName().startsWith(QLatin1String("QMultiHash"))
+ || line.functionName().startsWith(QLatin1String("QHashData")) ) {
+ return false;
+ }
+
+ return true;
+}
+
+void BacktraceParser::calculateRatingData()
+{
+ Q_D(BacktraceParser);
+
+ uint rating = 0, bestPossibleRating = 0, counter = 0;
+ bool haveSeenStackBase = false;
+
+ QListIterator i(d->m_linesToRate);
+ i.toBack(); //start from the end of the list
+
+ while( i.hasPrevious() ) {
+ const BacktraceLine & line = i.previous();
+
+ if ( !i.hasPrevious() && line.rating() == BacktraceLine::MissingEverything ) {
+ //Under some circumstances, the very first stack frame is invalid (ex, calling a function
+ //at an invalid address could result in a stack frame like "0x00000000 in ?? ()"),
+ //which however does not necessarily mean that the backtrace has a missing symbol on
+ //the first line. Here we make sure to ignore this line from rating. (bug 190882)
+ break; //there are no more items anyway, just break the loop
+ }
+
+ if ( lineIsStackBase(line) ) {
+ rating = bestPossibleRating = counter = 0; //restart rating ignoring any previous frames
+ haveSeenStackBase = true;
+ } else if ( lineIsStackTop(line) ) {
+ break; //we have reached the top, no need to inspect any more frames
+ }
+
+ if ( lineShouldBeIgnored(line) ) {
+ continue;
+ }
+
+ if ( line.rating() == BacktraceLine::MissingFunction
+ || line.rating() == BacktraceLine::MissingSourceFile) {
+ d->m_librariesWithMissingDebugSymbols.insert(line.libraryName().trimmed());
+ }
+
+ uint multiplier = ++counter; //give weight to the first lines
+ rating += static_cast(line.rating()) * multiplier;
+ bestPossibleRating += static_cast(BacktraceLine::BestRating) * multiplier;
+
+ kDebug() << line.rating() << line.toString();
+ }
+
+ //Generate a simplified backtrace
+ //- Starts from the first useful function
+ //- Max of 5 lines
+ //- Replaces garbage with [...]
+ //At the same time, grab the first three useful functions for search queries
+
+ i.toFront(); //Reuse the list iterator
+ int functionIndex = 0;
+ int usefulFunctionsCount = 0;
+ bool firstUsefulFound = false;
+ while( i.hasNext() && functionIndex < 5 ) {
+ const BacktraceLine & line = i.next();
+ if ( !lineShouldBeIgnored(line) && isFunctionUseful(line) ) { //Line is not garbage to use
+ if (!firstUsefulFound) {
+ firstUsefulFound = true;
+ }
+ //Save simplified backtrace line
+ d->m_simplifiedBacktrace += line.toString();
+
+ //Fetch three useful functions (only functionName) for search queries
+ if (usefulFunctionsCount < 3 && isFunctionUsefulForSearch(line) &&
+ !d->m_firstUsefulFunctions.contains(line.functionName())) {
+ d->m_firstUsefulFunctions.append(line.functionName());
+ usefulFunctionsCount++;
+ }
+
+ functionIndex++;
+ } else if (firstUsefulFound) {
+ //Add "[...]" if there are invalid functions in the middle
+ if (!d->m_simplifiedBacktrace.endsWith(QLatin1String("[...]\n"))) {
+ d->m_simplifiedBacktrace += QLatin1String("[...]\n");
+ }
+ }
+ }
+
+ //calculate rating
+ d->m_usefulness = Useless;
+ if (rating >= (bestPossibleRating*0.90)) {
+ d->m_usefulness = ReallyUseful;
+ } else if (rating >= (bestPossibleRating*0.70)) {
+ d->m_usefulness = MayBeUseful;
+ } else if (rating >= (bestPossibleRating*0.40)) {
+ d->m_usefulness = ProbablyUseless;
+ }
+
+ //if there is no stack base, the executable is probably stripped,
+ //so we need to be more strict with rating
+ if ( !haveSeenStackBase ) {
+ //less than 4 stack frames is useless
+ if ( counter < 4 ) {
+ d->m_usefulness = Useless;
+ //more than 4 stack frames might have some value, so let's not be so strict, just lower the rating
+ } else if ( d->m_usefulness > Useless ) {
+ d->m_usefulness = (Usefulness) (d->m_usefulness - 1);
+ }
+ }
+
+ kDebug() << "Rating:" << rating << "out of" << bestPossibleRating << "Usefulness:"
+ << staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("Usefulness")).valueToKey(d->m_usefulness);
+ kDebug() << "90%:" << (bestPossibleRating*0.90) << "70%:" << (bestPossibleRating*0.70)
+ << "40%:" << (bestPossibleRating*0.40);
+ kDebug() << "Have seen stack base:" << haveSeenStackBase << "Lines counted:" << counter;
+}
+
+#include "backtraceparser.moc"
diff --git a/drkonqi/parser/backtraceparser.h b/drkonqi/parser/backtraceparser.h
new file mode 100644
index 00000000..a8554486
--- /dev/null
+++ b/drkonqi/parser/backtraceparser.h
@@ -0,0 +1,99 @@
+/*
+ Copyright (C) 2009-2010 George Kiagiadakis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+#ifndef BACKTRACEPARSER_H
+#define BACKTRACEPARSER_H
+
+#include "backtraceline.h"
+#include
+#include
+#include
+#include
+class BacktraceParserPrivate;
+
+class BacktraceParser : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(BacktraceParser)
+ Q_ENUMS(Usefulness)
+public:
+ enum Usefulness { InvalidUsefulness, Useless, ProbablyUseless, MayBeUseful, ReallyUseful };
+
+ static BacktraceParser *newParser(const QString & debuggerName, QObject *parent = 0);
+ virtual ~BacktraceParser();
+
+ /*! Connects the parser to the backtrace generator.
+ * Any QObject that defines the starting() and newLine(QString) signals will do.
+ */
+ void connectToGenerator(QObject *generator);
+
+ /*! Returns the parsed backtrace. Any garbage that should not be shown to the user is removed. */
+ virtual QString parsedBacktrace() const;
+
+ /*! Same as parsedBacktrace(), but the backtrace here is returned as a list of
+ * BacktraceLine objects, which provide extra information on each line.
+ */
+ virtual QList parsedBacktraceLines() const;
+
+ /*! Returns a simplified version of the backtrace. This backtrace:
+ * \li Starts from the first useful function
+ * \li Has maximum 5 lines
+ * \li Replaces garbage with [...]
+ */
+ virtual QString simplifiedBacktrace() const;
+
+ /*! Returns a value that indicates how much useful is the backtrace that we got */
+ virtual Usefulness backtraceUsefulness() const;
+
+ /*! Returns a short list of the first good functions that appear in the backtrace
+ * (in the crashing thread). This is used for quering for duplicate reports.
+ */
+ virtual QStringList firstValidFunctions() const;
+
+ /*! Returns a list of libraries/executables that are missing debug symbols. */
+ virtual QSet