Bugzilla – Attachment 280 Details for
Bug 909
PV Views could show default names such as "Session 1: View 1"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
viewnames
pv_viewnames.patch (text/plain), 2.12 KB, created by
Uwe Hermann
on 2017-03-04 16:00:23 CET
(
hide
)
Description:
viewnames
Filename:
MIME Type:
Creator:
Uwe Hermann
Created:
2017-03-04 16:00:23 CET
Size:
2.12 KB
patch
obsolete
>diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp >index 8573332..d15362f 100644 >--- a/pv/mainwindow.cpp >+++ b/pv/mainwindow.cpp >@@ -162,6 +162,11 @@ shared_ptr<views::ViewBase> MainWindow::get_active_view() const > shared_ptr<views::ViewBase> MainWindow::add_view(const QString &title, > views::ViewType type, Session &session) > { >+ static int last_view_id = 1; >+ QString name = tr("VVVVVVVVV-%1").arg(last_view_id++); >+ >+ (void)title; >+ > QMainWindow *main_window = nullptr; > for (auto entry : session_windows_) > if (entry.first.get() == &session) >@@ -171,7 +176,8 @@ shared_ptr<views::ViewBase> MainWindow::add_view(const QString &title, > > if (type == views::ViewTypeTrace) { > QDockWidget* dock = new QDockWidget(title, main_window); >- dock->setObjectName(title); >+ // dock->setObjectName(title); >+ dock->setObjectName(name); > main_window->addDockWidget(Qt::TopDockWidgetArea, dock); > > // Insert a QMainWindow into the dock widget to allow for a tool bar >@@ -268,7 +274,9 @@ void MainWindow::remove_view(shared_ptr<views::ViewBase> view) > shared_ptr<Session> MainWindow::add_session() > { > static int last_session_id = 1; >+ static int last_view_id = 1; > QString name = tr("Session-%1").arg(last_session_id++); >+ QString view_name = tr("XXXX-%1").arg(last_view_id++); > > shared_ptr<Session> session = make_shared<Session>(device_manager_, name); > >@@ -293,7 +301,7 @@ shared_ptr<Session> MainWindow::add_session() > window->setDockNestingEnabled(true); > > shared_ptr<views::ViewBase> main_view = >- add_view(name, views::ViewTypeTrace, *session); >+ add_view(view_name, views::ViewTypeTrace, *session); > > return session; > } >@@ -544,10 +552,15 @@ void MainWindow::show_session_error(const QString text, const QString info_text) > void MainWindow::on_add_view(const QString &title, views::ViewType type, > Session *session) > { >+ static int last_view_id = 1; >+ QString name = tr("View-%1").arg(last_view_id++); >+ >+ (void)title; >+ > // We get a pointer and need a reference > for (std::shared_ptr<Session> s : sessions_) > if (s.get() == session) >- add_view(title, type, *s); >+ add_view(name, type, *s); > } > > void MainWindow::on_focus_changed()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 909
: 280