mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 22:45:41 +01:00
Disable unavailable context menu items in transactions tab
This commit is contained in:
@@ -230,7 +230,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;
|
||||
@@ -243,13 +243,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