Skip to content

Commit

Permalink
singleton fix for QT 5.10 and other miscellaneous warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JosepMaJAZ committed Dec 21, 2017
1 parent 24028f2 commit 7f0568d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/xwax/lut_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int lut_init(struct lut *lut, int nslots)
bytes = sizeof(struct slot) * nslots + sizeof(slot_no_t) * hashes;

fprintf(stderr, "Lookup table has %d hashes to %d slots"
" (%d slots per hash, %u Kb)\n",
" (%d slots per hash, %zuKb)\n",
hashes, nslots, nslots / hashes, bytes / 1024);

lut->slot = (struct slot*)(malloc(sizeof(struct slot) * nslots));
Expand Down
6 changes: 3 additions & 3 deletions src/mixxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ MixxxMainWindow::MixxxMainWindow(QApplication* pApp, const CmdlineArgs& args)

// Only record stats in developer mode.
if (m_cmdLineArgs.getDeveloper()) {
StatsManager::create();
StatsManager::createInstance();
}

m_pSettingsManager = new SettingsManager(this, args.getSettingsPath());
Expand Down Expand Up @@ -264,7 +264,7 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {
delete pModplugPrefs; // not needed anymore
#endif

CoverArtCache::create();
CoverArtCache::createInstance();

m_pDbConnectionPool = MixxxDb(pConfig).connectionPool();
if (!m_pDbConnectionPool) {
Expand Down Expand Up @@ -325,7 +325,7 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {

launchProgress(47);

WaveformWidgetFactory::create(); // takes a long time
WaveformWidgetFactory::createInstance(); // takes a long time
WaveformWidgetFactory::instance()->startVSync(m_pGuiTick);
WaveformWidgetFactory::instance()->setConfig(pConfig);

Expand Down
2 changes: 1 addition & 1 deletion src/util/singleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
template<class T>
class Singleton {
public:
static T* create() {
static T* createInstance() {
if (!m_instance) {
m_instance = new T();
}
Expand Down
3 changes: 2 additions & 1 deletion src/util/widgethider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ void WidgetHider::showWidget(QWidget* w) {
w->update();
}
#else
bool WidgetHider::eventFilter(QObject*, QEvent*) {
bool WidgetHider::eventFilter(QObject* watched, QEvent* event) {
return QObject::eventFilter(watched,event);
}

void WidgetHider::retainSizeFor(QWidget* widget)
Expand Down

0 comments on commit 7f0568d

Please sign in to comment.