Qt 4.8
Functions
qlibrary_unix.cpp File Reference
#include "qplatformdefs.h"
#include <qfile.h>
#include "qlibrary_p.h"
#include <qcoreapplication.h>
#include <private/qfilesystementry_p.h>
#include <private/qcore_mac_p.h>
#include <dlfcn.h>

Go to the source code of this file.

Functions

static QString qdlerror ()
 
Q_CORE_EXPORT void * qt_mac_resolve_sys (void *handle, const char *symbol)
 

Function Documentation

◆ qdlerror()

static QString qdlerror ( )
static

Definition at line 71 of file qlibrary_unix.cpp.

Referenced by QLibraryPrivate::load_sys(), QLibraryPrivate::resolve_sys(), and QLibraryPrivate::unload_sys().

72 {
73 #if defined(QT_NO_DYNAMIC_LIBRARY)
74  const char *err = "This platform does not support dynamic libraries.";
75 #elif !defined(QT_HPUX_LD)
76  const char *err = dlerror();
77 #else
78  const char *err = strerror(errno);
79 #endif
80  return err ? QLatin1Char('(') + QString::fromLocal8Bit(err) + QLatin1Char(')'): QString();
81 }
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
Definition: qstring.cpp:4245
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
int errno

◆ qt_mac_resolve_sys()

Q_CORE_EXPORT void* qt_mac_resolve_sys ( void *  handle,
const char *  symbol 
)

Definition at line 287 of file qlibrary_unix.cpp.

288 {
289  return dlsym(handle, symbol);
290 }