本文整理汇总了C++中KApplication::organizationDomain方法的典型用法代码示例。如果您正苦于以下问题:C++ KApplication::organizationDomain方法的具体用法?C++ KApplication::organizationDomain怎么用?C++ KApplication::organizationDomain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KApplication
的用法示例。
在下文中一共展示了KApplication::organizationDomain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void KApplicationPrivate::init()
{
if ((getuid() != geteuid()) ||
(getgid() != getegid()))
{
fprintf(stderr, "The KDE libraries are not designed to run with suid privileges.\n");
::exit(127);
}
KApplication::KApp = q;
// make sure the clipboard is created before setting the window icon (bug 209263)
(void) QApplication::clipboard();
parseCommandLine();
(void) KClipboardSynchronizer::self();
QApplication::setDesktopSettingsAware( false );
#ifdef Q_WS_X11
// create all required atoms in _one_ roundtrip to the X server
const int max = 20;
Atom* atoms[max];
char* names[max];
Atom atoms_return[max];
int n = 0;
atoms[n] = &atom_DesktopWindow;
names[n++] = (char *) "KDE_DESKTOP_WINDOW";
atoms[n] = &atom_NetSupported;
names[n++] = (char *) "_NET_SUPPORTED";
atoms[n] = &kde_xdnd_drop;
names[n++] = (char *) "XdndDrop";
XInternAtoms( QX11Info::display(), names, n, false, atoms_return );
for (int i = 0; i < n; i++ )
*atoms[i] = atoms_return[i];
#endif
// sanity checking, to make sure we've connected
QDBusConnectionInterface *bus = 0;
if (!QDBusConnection::sessionBus().isConnected() || !(bus = QDBusConnection::sessionBus().interface())) {
kFatal(240) << "Session bus not found" << endl <<
"To circumvent this problem try the following command (with Linux and bash)" << endl <<
"export $(dbus-launch)";
::exit(125);
}
extern bool s_kuniqueapplication_startCalled;
if ( bus && !s_kuniqueapplication_startCalled ) // don't register again if KUniqueApplication did so already
{
QStringList parts = q->organizationDomain().split(QLatin1Char('.'), QString::SkipEmptyParts);
QString reversedDomain;
if (parts.isEmpty())
reversedDomain = QLatin1String("local.");
else
foreach (const QString& s, parts)
{
reversedDomain.prepend(QLatin1Char('.'));
reversedDomain.prepend(s);
}