OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46549a7
)
delete the private QLibrary data pointer if library is unloaded, swap it otherwise
author
Ivailo Monev
<xakepa10@gmail.com>
Sun, 12 Jun 2022 14:30:59 +0000
(17:30 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Sun, 12 Jun 2022 14:30:59 +0000
(17:30 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/plugin/qlibrary.cpp
patch
|
blob
|
history
diff --git
a/src/core/plugin/qlibrary.cpp
b/src/core/plugin/qlibrary.cpp
index
fb5f90b
..
4d066f7
100644
(file)
--- a/
src/core/plugin/qlibrary.cpp
+++ b/
src/core/plugin/qlibrary.cpp
@@
-537,9
+537,16
@@
void QLibrary::setFileName(const QString &fileName)
if (qt_debug_component()) {
qDebug() << "QLibrary: reusing library" << librarymatch;
}
- delete d_ptr;
- d_ptr = loadedlibrary;
- loadedlibraries->removeAt(i);
+ if (!d_ptr->pHnd) {
+ delete d_ptr;
+ d_ptr = loadedlibrary;
+ loadedlibraries->removeAt(i);
+ } else {
+ QLibraryPrivate* x_ptr = d_ptr;
+ d_ptr = loadedlibrary;
+ loadedlibraries->removeAt(i);
+ loadedlibraries->append(x_ptr);
+ }
return;
}
}