更改结构视图中Item双击bug
This commit is contained in:
parent
227d979224
commit
021785d16c
|
|
@ -21,6 +21,7 @@ public:
|
|||
bool addModel(const QString&, Model&);
|
||||
bool modelNameExistsInDB(const QString&, const QString&);
|
||||
bool modelTypeExistsInDB(const QString&, const QString&);
|
||||
bool removeMode(const QString&, int);
|
||||
|
||||
signals:
|
||||
void errorOccurred(const QString& error);
|
||||
|
|
|
|||
|
|
@ -93,17 +93,20 @@ const QString DBStructureView::curConnection()
|
|||
|
||||
void DBStructureView::itemDoubleClick(const QModelIndex& index)
|
||||
{
|
||||
if(!m_curConnection.isEmpty()) //先断掉当前链接
|
||||
{
|
||||
disconnectToDB(m_curConnection);
|
||||
m_curConnection = "";
|
||||
}
|
||||
|
||||
DBStructureNode* node = static_cast<DBStructureNode*>(index.internalPointer());
|
||||
if(node->type() == ConnectionNode && node->status() == Disconnect)
|
||||
if(node->type() == ConnectionNode )
|
||||
{
|
||||
connectToDB(node->name());
|
||||
m_curConnection = node->name();
|
||||
if(!m_curConnection.isEmpty()) //先断掉当前链接
|
||||
{
|
||||
disconnectToDB(m_curConnection);
|
||||
m_curConnection = "";
|
||||
}
|
||||
|
||||
if(node->status() == Disconnect)
|
||||
{
|
||||
connectToDB(node->name());
|
||||
m_curConnection = node->name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,10 @@ bool SqlQueryExecutor::modelTypeExistsInDB(const QString& connectionName, const
|
|||
return exists;
|
||||
}
|
||||
|
||||
bool SqlQueryExecutor::removeMode(const QString& connectionName, int modelID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const QVector<AttributeGroup> SqlQueryExecutor::getAttributeGroup(const QString& strConnectionName)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue