removed namespaces

This commit is contained in:
fourtf
2018-06-26 16:37:59 +02:00
parent 15abedd869
commit 2df0566492
273 changed files with 43 additions and 826 deletions
-5
View File
@@ -31,11 +31,7 @@
#define SELECTION_RESUME_SCROLLING_MSG_THRESHOLD 3
#define CHAT_HOVER_PAUSE_DURATION 1000
using namespace chatterino::messages;
using namespace chatterino::providers::twitch;
namespace chatterino {
namespace widgets {
ChannelView::ChannelView(BaseWidget *parent)
: BaseWidget(parent)
@@ -1211,5 +1207,4 @@ int ChannelView::getLayoutWidth() const
return this->width();
}
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -20,7 +20,6 @@
#include <unordered_set>
namespace chatterino {
namespace widgets {
class ChannelView : public BaseWidget
{
@@ -160,5 +159,4 @@ private slots:
}
};
} // namespace widgets
} // namespace chatterino
@@ -3,7 +3,6 @@
#include <QComboBox>
namespace chatterino {
namespace widgets {
ComboBoxItemDelegate::ComboBoxItemDelegate(QObject *parent)
: QStyledItemDelegate(parent)
@@ -53,5 +52,4 @@ void ComboBoxItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *mod
else
QStyledItemDelegate::setModelData(editor, model, index);
}
} // namespace widgets
} // namespace chatterino
@@ -3,7 +3,6 @@
#include <QStyledItemDelegate>
namespace chatterino {
namespace widgets {
// stolen from https://wiki.qt.io/Combo_Boxes_in_Item_Views
@@ -22,5 +21,4 @@ public:
const QModelIndex &index) const;
};
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -8,7 +8,6 @@
#include <QTimer>
namespace chatterino {
namespace widgets {
DebugPopup::DebugPopup()
{
@@ -26,5 +25,4 @@ DebugPopup::DebugPopup()
layout->addWidget(text);
}
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -3,7 +3,6 @@
#include <QWindow>
namespace chatterino {
namespace widgets {
class DebugPopup : public QWidget
{
@@ -11,5 +10,4 @@ public:
DebugPopup();
};
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -6,7 +6,6 @@
#include <QPainter>
namespace chatterino {
namespace widgets {
NotebookPageDropPreview::NotebookPageDropPreview(BaseWidget *parent)
: BaseWidget(parent)
@@ -51,5 +50,4 @@ void NotebookPageDropPreview::setBounds(const QRect &rect)
// this->animate = true;
}
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -6,7 +6,6 @@
#include <QWidget>
namespace chatterino {
namespace widgets {
class NotebookPageDropPreview : public BaseWidget
{
@@ -24,5 +23,4 @@ protected:
// bool animate = false;
};
} // namespace widgets
} // namespace chatterino
-4
View File
@@ -8,8 +8,6 @@
#include <QVBoxLayout>
namespace chatterino {
namespace widgets {
namespace helper {
EditableModelView::EditableModelView(QAbstractTableModel *_model)
: tableView(new QTableView(this))
@@ -71,6 +69,4 @@ QAbstractTableModel *EditableModelView::getModel()
return this->model;
}
} // namespace helper
} // namespace widgets
} // namespace chatterino
-4
View File
@@ -8,8 +8,6 @@ class QAbstractTableModel;
class QTableView;
namespace chatterino {
namespace widgets {
namespace helper {
class EditableModelView : public QWidget
{
@@ -28,6 +26,4 @@ private:
QAbstractTableModel *model;
};
} // namespace helper
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -5,7 +5,6 @@
#include <QPainter>
namespace chatterino {
namespace widgets {
class Line : public BaseWidget
{
@@ -38,5 +37,4 @@ private:
bool vertical_;
};
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -12,7 +12,6 @@
#define nuuls nullptr
namespace chatterino {
namespace widgets {
NotebookButton::NotebookButton(BaseWidget *parent)
: RippleEffectButton(parent)
@@ -158,5 +157,4 @@ void NotebookButton::dropEvent(QDropEvent *event)
}
}
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -5,7 +5,6 @@
#include <QWidget>
namespace chatterino {
namespace widgets {
class NotebookButton : public RippleEffectButton
{
@@ -35,5 +34,4 @@ private:
QPoint mousePos_;
};
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -19,7 +19,6 @@
#include <boost/bind.hpp>
namespace chatterino {
namespace widgets {
NotebookTab::NotebookTab(Notebook *notebook)
: RippleEffectButton(notebook)
@@ -454,5 +453,4 @@ QRect NotebookTab::getXRect()
static_cast<int>(16 * s), static_cast<int>(16 * s));
}
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -10,7 +10,6 @@
#include <pajlada/signals/connection.hpp>
namespace chatterino {
namespace widgets {
#define NOTEBOOK_TAB_HEIGHT 28
@@ -90,5 +89,4 @@ private:
void titleUpdated();
};
} // namespace widgets
} // namespace chatterino
+4
View File
@@ -2,6 +2,8 @@
#include "common/Common.hpp"
#include "common/CompletionModel.hpp"
namespace chatterino {
ResizingTextEdit::ResizingTextEdit()
{
auto sizePolicy = this->sizePolicy();
@@ -200,3 +202,5 @@ QCompleter *ResizingTextEdit::getCompleter() const
{
return this->completer;
}
}
+4
View File
@@ -5,6 +5,8 @@
#include <QTextEdit>
#include <pajlada/signals/signal.hpp>
namespace chatterino {
class ResizingTextEdit : public QTextEdit
{
public:
@@ -38,3 +40,5 @@ private:
private slots:
void insertCompletion(const QString &completion);
};
}
@@ -6,7 +6,6 @@
#include "singletons/ThemeManager.hpp"
namespace chatterino {
namespace widgets {
RippleEffectButton::RippleEffectButton(BaseWidget *parent)
: BaseWidget(parent)
@@ -191,5 +190,4 @@ void RippleEffectButton::onMouseEffectTimeout()
}
}
} // namespace widgets
} // namespace chatterino
@@ -11,7 +11,6 @@
#include <QWidget>
namespace chatterino {
namespace widgets {
class RippleEffectButton : public BaseWidget
{
@@ -66,5 +65,4 @@ private:
void onMouseEffectTimeout();
};
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -6,7 +6,6 @@
#include <QPainter>
namespace chatterino {
namespace widgets {
RippleEffectLabel::RippleEffectLabel(BaseWidget *parent, int spacing)
: RippleEffectButton(parent)
@@ -43,5 +42,4 @@ Label &RippleEffectLabel2::getLabel()
return this->label_;
}
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -11,7 +11,6 @@
#include <QWidget>
namespace chatterino {
namespace widgets {
class RippleEffectLabel : public RippleEffectButton
{
@@ -39,5 +38,4 @@ private:
Label label_;
};
} // namespace widgets
} // namespace chatterino
@@ -3,7 +3,6 @@
#include "widgets/Scrollbar.hpp"
namespace chatterino {
namespace widgets {
ScrollbarHighlight::ScrollbarHighlight()
: color(Color::Highlight)
@@ -32,5 +31,4 @@ bool ScrollbarHighlight::isNull() const
return this->style == None;
}
} // namespace widgets
} // namespace chatterino
@@ -3,7 +3,6 @@
#include <QString>
namespace chatterino {
namespace widgets {
class ScrollbarHighlight
{
@@ -23,5 +22,4 @@ private:
Style style;
};
} // namespace widgets
} // namespace chatterino
+2 -2
View File
@@ -8,7 +8,7 @@
#include "widgets/helper/ChannelView.hpp"
namespace chatterino {
namespace widgets {
SearchPopup::SearchPopup()
{
this->initLayout();
@@ -83,5 +83,5 @@ void SearchPopup::performSearch()
this->channelView->setChannel(channel);
}
} // namespace widgets
} // namespace chatterino
-4
View File
@@ -11,9 +11,6 @@ class QLineEdit;
namespace chatterino {
class Channel;
namespace widgets {
class ChannelView;
class SearchPopup : public BaseWindow
@@ -32,5 +29,4 @@ private:
void performSearch();
};
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -6,7 +6,6 @@
#include <QStyleOption>
namespace chatterino {
namespace widgets {
SettingsDialogTab::SettingsDialogTab(SettingsDialog *_dialog, settingspages::SettingsPage *_page,
QString imageFileName)
@@ -68,5 +67,4 @@ void SettingsDialogTab::mousePressEvent(QMouseEvent *event)
this->dialog->select(this);
}
} // namespace widgets
} // namespace chatterino
+1 -5
View File
@@ -7,11 +7,8 @@
#include <QWidget>
namespace chatterino {
namespace widgets {
namespace settingspages {
class SettingsPage;
} // namespace settingspages
class SettingsPage;
class SettingsDialog;
class SettingsDialogTab : public BaseWidget
@@ -44,5 +41,4 @@ private:
bool selected = false;
};
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -4,7 +4,6 @@
#include <QWidget>
namespace chatterino {
namespace widgets {
template <typename WidgetType, typename Func>
inline void CreateShortcut(WidgetType *w, const char *key, Func func)
@@ -22,5 +21,4 @@ inline void CreateWindowShortcut(WidgetType *w, const char *key, Func func)
QObject::connect(s, &QShortcut::activated, w, func);
}
} // namespace widgets
} // namespace chatterino
+4
View File
@@ -1,5 +1,7 @@
#include "widgets/helper/SignalLabel.hpp"
namespace chatterino {
SignalLabel::SignalLabel(QWidget *parent, Qt::WindowFlags f)
: QLabel(parent, f)
{
@@ -33,3 +35,5 @@ void SignalLabel::mouseMoveEvent(QMouseEvent *event)
emit this->mouseMove(event);
event->ignore();
}
}
+4
View File
@@ -5,6 +5,8 @@
#include <QMouseEvent>
#include <QWidget>
namespace chatterino {
class SignalLabel : public QLabel
{
Q_OBJECT
@@ -26,3 +28,5 @@ protected:
void mouseReleaseEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
};
}
-2
View File
@@ -3,7 +3,6 @@
#include "singletons/ThemeManager.hpp"
namespace chatterino {
namespace widgets {
TitleBarButton::TitleBarButton()
: RippleEffectButton(nullptr)
@@ -119,5 +118,4 @@ void TitleBarButton::paintEvent(QPaintEvent *)
this->fancyPaint(painter);
}
} // namespace widgets
} // namespace chatterino
-2
View File
@@ -3,7 +3,6 @@
#include "widgets/helper/RippleEffectButton.hpp"
namespace chatterino {
namespace widgets {
class TitleBarButton : public RippleEffectButton
{
@@ -22,5 +21,4 @@ private:
Style style;
};
} // namespace widgets
} // namespace chatterino