diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-07 16:57:26 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-07 16:57:26 +0200 |
commit | a635619cc03bfecde9ab82767ec2a8d95b4b46aa (patch) | |
tree | 9a90f5ebe2338228377b20333cce0798f32896d2 /Libraries/LibGUI | |
parent | 568936775fc2406a5d604e7782e42a108597f98a (diff) | |
download | serenity-a635619cc03bfecde9ab82767ec2a8d95b4b46aa.zip |
GTabWidget: Rename get_active_tab() => active_tab_index()
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/GTabWidget.cpp | 8 | ||||
-rw-r--r-- | Libraries/LibGUI/GTabWidget.h | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Libraries/LibGUI/GTabWidget.cpp b/Libraries/LibGUI/GTabWidget.cpp index 530fb7f0f8..049be01b1b 100644 --- a/Libraries/LibGUI/GTabWidget.cpp +++ b/Libraries/LibGUI/GTabWidget.cpp @@ -209,13 +209,11 @@ void GTabWidget::set_tab_position(TabPosition tab_position) update(); } -int GTabWidget::get_active_tab() const +int GTabWidget::active_tab_index() const { - for(int i = 0; i < m_tabs.size(); i++) - { - if(m_tabs.at(i).widget == m_active_widget) + for (int i = 0; i < m_tabs.size(); i++) { + if (m_tabs.at(i).widget == m_active_widget) return i; } - return -1; } diff --git a/Libraries/LibGUI/GTabWidget.h b/Libraries/LibGUI/GTabWidget.h index 395b238b3d..22bf13b985 100644 --- a/Libraries/LibGUI/GTabWidget.h +++ b/Libraries/LibGUI/GTabWidget.h @@ -15,7 +15,8 @@ public: TabPosition tab_position() const { return m_tab_position; } void set_tab_position(TabPosition); - int get_active_tab() const; + + int active_tab_index() const; GWidget* active_widget() const { return m_active_widget; } void set_active_widget(GWidget*); |