Remove "using namespace" from header files and change std::strings to QStrings.
This commit is contained in:
parent
8fb689d163
commit
24f699beb4
6 changed files with 9 additions and 21 deletions
2
Button.h
2
Button.h
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include "PixWidget.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Button : public PixWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -25,8 +25,6 @@ class MainDisplay;
|
|||
#include "PlayStatus.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class MainDisplay : public SkinDisplay
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -20,8 +20,6 @@ class MainWindow;
|
|||
#include "ShadedDisplay.h"
|
||||
#include "Playlist.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
11
Skin.cpp
11
Skin.cpp
|
@ -82,7 +82,7 @@ Skin::BuildPlaylist (void)
|
|||
}
|
||||
|
||||
void
|
||||
Skin::setSkin (QString name)
|
||||
Skin::setSkin (const QString& name)
|
||||
{
|
||||
m_path = name;
|
||||
|
||||
|
@ -110,7 +110,7 @@ Skin::setSkin (QString name)
|
|||
}
|
||||
|
||||
QPixmap
|
||||
Skin::getPixmap (QString f, QDir dir)
|
||||
Skin::getPixmap (const QString& file, QDir dir)
|
||||
{
|
||||
/* check for files in zip and check if file exists */
|
||||
|
||||
|
@ -120,7 +120,7 @@ Skin::getPixmap (QString f, QDir dir)
|
|||
for (int i = 0; i < list.size(); ++i) {
|
||||
QFileInfo fileInfo = list.at(i);
|
||||
QString fname = fileInfo.fileName().toLower();
|
||||
if (fname.section(".", 0, 0) == f) {
|
||||
if (fname.section(".", 0, 0) == file) {
|
||||
return QPixmap (fileInfo.filePath());
|
||||
}
|
||||
}
|
||||
|
@ -130,10 +130,9 @@ Skin::getPixmap (QString f, QDir dir)
|
|||
|
||||
|
||||
QPixmap *
|
||||
Skin::getPixmap (string file)
|
||||
Skin::getPixmap (const QString& file)
|
||||
{
|
||||
QDir dir;
|
||||
QString f = QString::fromStdString (file);
|
||||
|
||||
dir.setPath (m_path);
|
||||
dir.setFilter (QDir::Files);
|
||||
|
@ -142,7 +141,7 @@ Skin::getPixmap (string file)
|
|||
for (int i = 0; i < list.size(); ++i) {
|
||||
QFileInfo fileInfo = list.at(i);
|
||||
QString fname = fileInfo.fileName().toLower();
|
||||
if (fname.section(".", 0, 0) == f) {
|
||||
if (fname.section(".", 0, 0) == file) {
|
||||
return new QPixmap (fileInfo.filePath());
|
||||
}
|
||||
}
|
||||
|
|
11
Skin.h
11
Skin.h
|
@ -9,8 +9,6 @@
|
|||
#include <QHash>
|
||||
#include <QDir>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Skin : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -19,8 +17,8 @@ class Skin : public QWidget
|
|||
Skin ();
|
||||
~Skin();
|
||||
|
||||
void setSkin (QString name);
|
||||
static QPixmap getPixmap (QString, QDir);
|
||||
void setSkin (const QString& name);
|
||||
static QPixmap getPixmap (const QString&, QDir);
|
||||
|
||||
const QPixmap getItem (uint part) const { return m_items->value(part); }
|
||||
const QPixmap getPls (uint part) const { return m_playlist->value(part); }
|
||||
|
@ -194,8 +192,7 @@ class Skin : public QWidget
|
|||
private:
|
||||
static Skin *singleton;
|
||||
|
||||
QPixmap *Skin::getPixmap (string file);
|
||||
void Parse (string file);
|
||||
QPixmap *Skin::getPixmap (const QString& file);
|
||||
void BuildLetterMap (void);
|
||||
void BuildButtons (void);
|
||||
void BuildToggleButtons (void);
|
||||
|
@ -207,7 +204,7 @@ class Skin : public QWidget
|
|||
void ParsePLEdit (void);
|
||||
|
||||
|
||||
string m_skinname;
|
||||
QString m_skinname;
|
||||
QString m_path;
|
||||
|
||||
QHash<uint, QPixmap> *m_items;
|
||||
|
|
|
@ -6,8 +6,6 @@ class TitleBar;
|
|||
#include "PixWidget.h"
|
||||
#include "Button.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class TitleBar : public PixWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue