summaryrefslogtreecommitdiff
path: root/qmake/tools/qlibrary.cpp
Side-by-side diff
Diffstat (limited to 'qmake/tools/qlibrary.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/tools/qlibrary.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/qmake/tools/qlibrary.cpp b/qmake/tools/qlibrary.cpp
index 564db30..be1d54b 100644
--- a/qmake/tools/qlibrary.cpp
+++ b/qmake/tools/qlibrary.cpp
@@ -1,14 +1,14 @@
/****************************************************************************
** $Id$
**
** Implementation of QLibrary class
**
-** Created : 2000-01-01
+** Created : 000101
**
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2003 Trolltech AS. All rights reserved.
**
** This file is part of the tools module of the Qt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
@@ -68,13 +68,13 @@ QLibraryPrivate::QLibraryPrivate( QLibrary *lib )
/*!
\class QLibrary qlibrary.h
\reentrant
\brief The QLibrary class provides a wrapper for handling shared libraries.
\mainclass
- \group plugins
+ \ingroup plugins
An instance of a QLibrary object can handle a single shared
library and provide access to the functionality in the library in
a platform independent way. If the library is a component server,
QLibrary provides access to the exported component and can
directly query this component for interfaces.
@@ -323,20 +323,21 @@ QString QLibrary::library() const
if ( filename.findRev( '.' ) <= filename.findRev( '/' ) )
filename += ".dll";
#elif defined(Q_OS_MACX)
if ( filename.find( ".dylib" ) == -1 )
filename += ".dylib";
#else
- if ( filename.find( ".so" ) == -1 ) {
+ QString filter = ".so";
+ if ( filename.find(filter) == -1 ) {
const int x = filename.findRev( "/" );
if ( x != -1 ) {
QString path = filename.left( x + 1 );
QString file = filename.right( filename.length() - x - 1 );
- filename = QString( "%1lib%2.so" ).arg( path ).arg( file );
+ filename = QString( "%1lib%2.%3" ).arg( path ).arg( file ).arg( filter );
} else {
- filename = QString( "lib%1.so" ).arg( filename );
+ filename = QString( "lib%1.%2" ).arg( filename ).arg( filter );
}
}
#endif
return filename;
}