Skip to content

Commit 81bfab9

Browse files
committed
Plugins::QRCode: fix core dump
1 parent e530ec6 commit 81bfab9

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

Plugin/App/QRCode/CPluginQRCode.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,13 @@ int CPluginQRCode::Open(void *pPara, QWidget *parent)
2121
{
2222
Q_UNUSED(pPara);
2323
Q_UNUSED(parent);
24-
if(m_FrmScanQRCode.isNull())
25-
m_FrmScanQRCode = QSharedPointer<CFrmScanQRcode>(new CFrmScanQRcode());
26-
if(!m_FrmScanQRCode.isNull())
27-
m_FrmScanQRCode->show();
24+
m_FrmScanQRCode.show();
2825
return 0;
2926
}
3027

3128
int CPluginQRCode::Close()
3229
{
33-
if(!m_FrmScanQRCode.isNull())
34-
{
35-
m_FrmScanQRCode->close();
36-
m_FrmScanQRCode.clear();
37-
}
30+
m_FrmScanQRCode.close();
3831
return 0;
3932
}
4033

Plugin/App/QRCode/CPluginQRCode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CPluginQRCode : public QObject, CPluginApp
3838
virtual QIcon Icon();
3939

4040
private:
41-
QSharedPointer<CFrmScanQRcode> m_FrmScanQRCode;
41+
CFrmScanQRcode m_FrmScanQRCode;
4242
};
4343

4444
#endif // CPLUGINQRCODE_H

0 commit comments

Comments
 (0)