• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • kernel
kstandarddirs_win.cpp
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2007 Bernhard Loos <nhuh.put@web.de>
3 Copyright (C) 2008 Christian Ehrlicher <ch.ehrlicher@gmx.de>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#include "kstandarddirs.h"
21
22#include <config-prefix.h>
23#include <config.h>
24#include "kkernel_win.h"
25
26QString getKde4Prefix();
27
28inline QString prefix() { return getKde4Prefix(); }
29inline QString share() { return getKde4Prefix() + QLatin1String("share/"); }
30inline QString kde_moduledir() { return getKde4Prefix() + QLatin1String("lib/kde4/"); }
31
32QString KStandardDirs::installPath(const char *type)
33{
34 Q_ASSERT(type != NULL);
35
36 switch (type[0]) {
37 case 'a':
38 if (strcmp("apps", type) == 0)
39 return share() + QLatin1String("applnk/");
40 break;
41 case 'c':
42 if (strcmp("config", type) == 0)
43 return share() + QLatin1String("config/");
44 break;
45 case 'k':
46 if (strcmp("kcfg", type) == 0)
47 return share() + QLatin1String("config.kcfg/");
48 if (strcmp("kdedir", type) == 0)
49 return prefix();
50 break;
51 case 'd':
52 if (strcmp("data", type) == 0)
53 return share() + QLatin1String("apps/");
54 break;
55 case 'e':
56 if (strcmp("exe", type) == 0)
57 return prefix() + QLatin1String("bin/");
58 break;
59 case 'h':
60 if (strcmp("html", type) == 0)
61 return share() + QLatin1String("doc/HTML/");
62 break;
63 case 'i':
64 if (strcmp("icon", type) == 0)
65 return share() + QLatin1String("icons/");
66 if (strcmp("include", type) == 0)
67 return prefix() + QLatin1String("include/");
68 break;
69 case 'l':
70 if (strcmp("lib", type) == 0)
71 return prefix() + QLatin1String("lib" KDELIBSUFF "/");
72 if (strcmp("libexec", type) == 0)
73 return prefix() + QLatin1String("lib" KDELIBSUFF "/kde4/libexec/");
74 if (strcmp("locale", type) == 0)
75 return share() + QLatin1String("locale/");
76 break;
77 case 'm':
78 if (strcmp("module", type) == 0)
79 return kde_moduledir();
80 if (strcmp("mime", type) == 0)
81 return share() + QLatin1String("mimelnk/");
82 break;
83 case 'q':
84 if (strcmp("qtplugins", type) == 0)
85 return kde_moduledir() + QLatin1String("plugins/");
86 break;
87 case 's':
88 if (strcmp("services", type) == 0)
89 return share() + QLatin1String("kde4/services/");
90 if (strcmp("servicetypes", type) == 0)
91 return share() + QLatin1String("kde4/servicetypes/");
92 if (strcmp("sound", type) == 0)
93 return share() + QLatin1String("sounds/");
94 break;
95 case 't':
96 if (strcmp("templates", type) == 0)
97 return share() + QLatin1String("templates/");
98 break;
99 case 'w':
100 if (strcmp("wallpaper", type) == 0)
101 return share() + QLatin1String("wallpapers/");
102 break;
103 case 'x':
104 if (strcmp("xdgconf-menu", type) == 0)
105 return share() + QLatin1String("xdg/menus/");
106 if (strcmp("xdgdata-apps", type) == 0)
107 return share() + QLatin1String("applications/kde4/");
108 if (strcmp("xdgdata-dirs", type) == 0)
109 return share() + QLatin1String("desktop-directories/");
110 break;
111 }
112 return QString();
113}
KStandardDirs::installPath
static QString installPath(const char *type)
Definition: kstandarddirs_unix.cpp:25
QString
kkernel_win.h
kstandarddirs.h
share
QString share()
Definition: kstandarddirs_win.cpp:29
getKde4Prefix
QString getKde4Prefix()
Definition: kkernel_win.cpp:97
kde_moduledir
QString kde_moduledir()
Definition: kstandarddirs_win.cpp:30
prefix
QString prefix()
Definition: kstandarddirs_win.cpp:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal