Fix clazy warnings regarding range-for references
[pulseview.git] / pv / toolbars / mainbar.hpp
index a47288c736c022b415e5cece48fd9bb81ac68197..e938dbbc01d1dc4c877be7bb7e42b07a460fd5f1 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef PULSEVIEW_PV_TOOLBARS_MAINBAR_HPP
 #define PULSEVIEW_PV_TOOLBARS_MAINBAR_HPP
 
-#include <stdint.h>
-
+#include <cstdint>
 #include <list>
 #include <memory>
 
 #include <pv/widgets/popuptoolbutton.hpp>
 #include <pv/widgets/sweeptimingwidget.hpp>
 
+using std::shared_ptr;
+
 namespace sigrok {
 class Device;
 class InputFormat;
 class OutputFormat;
 }
 
-Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Device>)
+Q_DECLARE_METATYPE(shared_ptr<sigrok::Device>)
 
 class QAction;
 
@@ -56,7 +56,7 @@ class MainWindow;
 class Session;
 
 namespace views {
-namespace TraceView {
+namespace trace {
 class View;
 }
 }
@@ -86,7 +86,7 @@ private:
 
 public:
        MainBar(Session &session, QWidget *parent,
-               pv::views::TraceView::View *view);
+               pv::views::trace::View *view);
 
        void update_device_list();
 
@@ -100,8 +100,6 @@ public:
        QAction* action_save_selection_as() const;
        QAction* action_connect() const;
 
-       void session_error(const QString text, const QString info_text);
-
 private:
        void run_stop();
 
@@ -127,9 +125,9 @@ private Q_SLOTS:
 
        void add_decoder(srd_decoder *decoder);
 
-       void export_file(std::shared_ptr<sigrok::OutputFormat> format,
+       void export_file(shared_ptr<sigrok::OutputFormat> format,
                bool selection_only = false);
-       void import_file(std::shared_ptr<sigrok::InputFormat> format);
+       void import_file(shared_ptr<sigrok::InputFormat> format);
 
        void on_device_selected();
        void on_device_changed();