mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 04:45:10 +02:00
Merge #17956: gui: Disable unavailable context menu items in transactions tab
2b18fd2242Disable unavailable context menu items in transactions tab (Kristaps Kaupe) Pull request description: Fixes #9192. ACKs for top commit: jonatack: Re-ACK2b18fd2242jonasschnelli: codereview utACK2b18fd2242Tree-SHA512: 4ea19c7b5976f1f0b1baecccb3077cf82f078af7257f92162686bcce2188efe49511a5f557853bc5fe0b10616708957d61c006944babbe60b8105e78751e865f
This commit is contained in:
@@ -232,7 +232,7 @@ QString HtmlEscape(const std::string& str, bool fMultiLine)
|
||||
return HtmlEscape(QString::fromStdString(str), fMultiLine);
|
||||
}
|
||||
|
||||
void copyEntryData(QAbstractItemView *view, int column, int role)
|
||||
void copyEntryData(const QAbstractItemView *view, int column, int role)
|
||||
{
|
||||
if(!view || !view->selectionModel())
|
||||
return;
|
||||
@@ -245,13 +245,20 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
|
||||
}
|
||||
}
|
||||
|
||||
QList<QModelIndex> getEntryData(QAbstractItemView *view, int column)
|
||||
QList<QModelIndex> getEntryData(const QAbstractItemView *view, int column)
|
||||
{
|
||||
if(!view || !view->selectionModel())
|
||||
return QList<QModelIndex>();
|
||||
return view->selectionModel()->selectedRows(column);
|
||||
}
|
||||
|
||||
bool hasEntryData(const QAbstractItemView *view, int column, int role)
|
||||
{
|
||||
QModelIndexList selection = getEntryData(view, column);
|
||||
if (selection.isEmpty()) return false;
|
||||
return !selection.at(0).data(role).toString().isEmpty();
|
||||
}
|
||||
|
||||
QString getDefaultDataDirectory()
|
||||
{
|
||||
return boostPathToQString(GetDefaultDataDir());
|
||||
|
||||
Reference in New Issue
Block a user