[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [blinken] /: Use KDEFrameworkCompilerSettings + use nullptr
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2018-09-23 17:37:11
Message-ID: 2226141.qbCC52QSf7 () xps
[Download RAW message or body]

Can you fix the spacing, it seems you broke it.

Also, why are you using *Frameworks* compiler settings in an application?

Cheers,
  Albert

El diumenge, 23 de setembre de 2018, a les 14:07:17 CEST, Laurent Montel va escriure:
> Git commit 998e49d38fcce0d2cd1bdc91203233ed6573aaf3 by Laurent Montel.
> Committed on 23/09/2018 at 12:07.
> Pushed by mlaurent into branch 'master'.
> 
> Use KDEFrameworkCompilerSettings + use nullptr
> 
> M  +5    -6    CMakeLists.txt
> M  +25   -25   src/blinken.cpp
> M  +1    -1    src/blinken.h
> M  +2    -2    src/blinkengame.h
> M  +4    -4    src/button.cpp
> M  +9    -9    src/highscoredialog.cpp
> M  +6    -6    src/main.cpp
> M  +10   -10   src/number.cpp
> M  +5    -5    src/soundsplayer.cpp
> M  +2    -2    src/soundsplayer.h
> 
> https://commits.kde.org/blinken/998e49d38fcce0d2cd1bdc91203233ed6573aaf3
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 019efcd..d4fe58a 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -3,31 +3,30 @@ project(blinken)
> cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
> 
> # minimal Qt requirement
> -set (QT_MIN_VERSION "5.2.0")
> +set(QT_MIN_VERSION "5.9.0")
> +set(KF5_VERSION "5.46.0")
> 
> # ECM
> -find_package (ECM 1.7.0 REQUIRED NO_MODULE)
> +find_package (ECM ${KF5_VERSION} REQUIRED NO_MODULE)
> 
> # where to look first for cmake modules
> set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
> 
> find_package (Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets Svg)
> 
> -find_package (KF5 REQUIRED COMPONENTS
> +find_package (KF5 ${KF5_VERSION} REQUIRED COMPONENTS
> I18n XmlGui GuiAddons DocTools DBusAddons Crash
> )
> 
> find_package (Phonon4Qt5 REQUIRED)
> 
> include(KDEInstallDirs)
> -include(KDECompilerSettings NO_POLICY_SCOPE)
> +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
> include(KDECMakeSettings)
> include(FeatureSummary)
> include(ECMAddAppIcon)
> include(ECMInstallIcons)
> 
> -add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
> -
> # global include directories
> include_directories (${CMAKE_CURRENT_BINARY_DIR})
> 
> diff --git a/src/blinken.cpp b/src/blinken.cpp
> index 008c3f5..a3b852e 100644
> --- a/src/blinken.cpp
> +++ b/src/blinken.cpp
> @@ -42,7 +42,7 @@ static const double nonButtonRibbonY = 125.0;
> 
> blinken::blinken() : m_overHighscore(false), m_overQuit(false), \
> m_overCentralText(false), m_overMenu(false), m_overAboutKDE(false), \
> m_overAboutBlinken(false), m_overSettings(false), m_overManual(false), \
> m_overCentralLetters(false), m_overCounter(false), m_overFont(false), \
> m_overSound(false), m_showPreferences(false), m_updateButtonHighlighting(false), \
> m_highlighted(blinkenGame::none) {
> -	m_renderer = new \
> QSvgRenderer(QStandardPaths::locate(QStandardPaths::DataLocation, \
> "images/blinken.svg")); +    m_renderer = new \
> QSvgRenderer(QStandardPaths::locate(QStandardPaths::DataLocation, \
> QStringLiteral("images/blinken.svg")));  
> 	m_buttons[0] = new button(blinkenGame::blue);
> 	m_buttons[1] = new button(blinkenGame::yellow);
> @@ -71,7 +71,7 @@ blinken::blinken() : m_overHighscore(false), m_overQuit(false), \
> m_overCentralTex  
> 	QString aux = i18nc("If the Steve font that is used by Blinken by default to show \
> status messages does not support any of the characters of your language, please \
> translate that message to 1 and KDE standard font will be used to show the texts, \
> if not translate it to 0", "0");  
> -	m_alwaysUseNonCoolFont = aux == "1";
> +    m_alwaysUseNonCoolFont = aux == QStringLiteral("1");
> 	setAutoSaveSettings();
> }
> 
> @@ -109,7 +109,7 @@ void blinken::paintEvent(QPaintEvent *)
> 	
> 	// Base
> 	// This -1 +1 suck but without them i got blank lines on borders
> -	p.drawPixmap(-1, 0, getPixmap("blinkenBase", size()+QSize(1,1)));
> +    p.drawPixmap(-1, 0, getPixmap(QStringLiteral("blinkenBase"), \
> size()+QSize(1,1)));  
> 	double xScaleButtons = 374.625 / 814.062;
> 	double yScaleButtons = 250.344 / 696.5;
> @@ -118,41 +118,41 @@ void blinken::paintEvent(QPaintEvent *)
> 	QSize sz = QSize((int)(width() * xScaleButtons), (int)(height() * yScaleButtons));
> 	if (m_highlighted & blinkenGame::red)
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 1.975, (double)height() / 28.0), \
> getPixmap("red_highlight", sz)); +        p.drawPixmap(QPointF( (double)width() / \
> 1.975, (double)height() / 28.0), getPixmap(QStringLiteral("red_highlight"), sz));  \
> }  else
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 1.975, (double)height() / 28.0), \
> getPixmap("red_normal", sz)); +        p.drawPixmap(QPointF( (double)width() / \
> 1.975, (double)height() / 28.0), getPixmap(QStringLiteral("red_normal"), sz));  }
> 	
> 	// Green button
> 	if (m_highlighted & blinkenGame::green)
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 1.975, (double)height() / 2.45), \
> getPixmap("green_highlight", sz)); +        p.drawPixmap(QPointF( (double)width() / \
> 1.975, (double)height() / 2.45), getPixmap(QStringLiteral("green_highlight"), sz)); \
> }  else
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 1.975, (double)height() / 2.45), \
> getPixmap("green_normal", sz)); +        p.drawPixmap(QPointF( (double)width() / \
> 1.975, (double)height() / 2.45), getPixmap(QStringLiteral("green_normal"), sz));  }
> 	
> 	// Yellow button
> 	if (m_highlighted & blinkenGame::yellow)
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 30.0, (double)height() / 28.0), \
> getPixmap("yellow_highlight", sz)); +        p.drawPixmap(QPointF( (double)width() \
> / 30.0, (double)height() / 28.0), getPixmap(QStringLiteral("yellow_highlight"), \
> sz));  }
> 	else
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 30.0, (double)height() / 28.0), \
> getPixmap("yellow_normal", sz)); +        p.drawPixmap(QPointF( (double)width() / \
> 30.0, (double)height() / 28.0), getPixmap(QStringLiteral("yellow_normal"), sz));  }
> 	
> 	// Blue button
> 	if (m_highlighted & blinkenGame::blue)
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 30.0, (double)height() / 2.45), \
> getPixmap("blue_highlight", sz)); +        p.drawPixmap(QPointF( (double)width() / \
> 30.0, (double)height() / 2.45), getPixmap(QStringLiteral("blue_highlight"), sz));  \
> }  else
> 	{
> -		p.drawPixmap(QPointF( (double)width() / 30.0, (double)height() / 2.45), \
> getPixmap("blue_normal", sz)); +        p.drawPixmap(QPointF( (double)width() / \
> 30.0, (double)height() / 2.45), getPixmap(QStringLiteral("blue_normal"), sz));  }
> 	
> 	drawMenuQuit(p);
> @@ -613,11 +613,11 @@ void blinken::drawMenuQuit(QPainter &p)
> 	p.scale(xScaleSquareButtons, yScaleSquareButtons);
> 	if (m_overHighscore)
> 	{
> -		m_renderer->render(&p, "highscore_hover");
> +        m_renderer->render(&p, QStringLiteral("highscore_hover"));
> 	}
> 	else
> 	{
> -		m_renderer->render(&p, "highscore_normal");
> +        m_renderer->render(&p, QStringLiteral("highscore_normal"));
> 	}
> 	m_highscoreRect = QRect(qRound((double)width() / 50.875),
> 	                        qRound((double)height() / 30.0),
> @@ -630,11 +630,11 @@ void blinken::drawMenuQuit(QPainter &p)
> 	p.scale(xScaleSquareButtons, yScaleSquareButtons);
> 	if (m_overQuit)
> 	{
> -		m_renderer->render(&p, "quit_hover");
> +        m_renderer->render(&p, QStringLiteral("quit_hover"));
> 	}
> 	else
> 	{
> -		m_renderer->render(&p, "quit_normal");
> +        m_renderer->render(&p, QStringLiteral("quit_normal"));
> 	}
> 	m_quitRect = QRect(qRound((double)width() / 1.15),
> 	                   qRound((double)height() / 30.0),
> @@ -649,7 +649,7 @@ void blinken::drawMenuQuit(QPainter &p)
> 		double yScaleHoverHelpButton = 225.0 / 696.5;
> 		p.translate( (double)width() / 1.42, (double)height() / 1.56 );
> 		p.scale(xScaleHoverHelpButton, yScaleHoverHelpButton);
> -		m_renderer->render(&p, "help_hover");
> +        m_renderer->render(&p, QStringLiteral("help_hover"));
> 		
> 		p.resetMatrix();
> 		double xScaleArrowButton1 = 40.0 / 814.062;
> @@ -661,32 +661,32 @@ void blinken::drawMenuQuit(QPainter &p)
> 		{
> 			p.translate((double)width() / 1.3877, (double)height() / 1.23);
> 			p.scale(xScaleArrowButton1, yScaleArrowButton1);
> -			m_renderer->render(&p, "arrow_down");
> +            m_renderer->render(&p, QStringLiteral("arrow_down"));
> 		}
> 		else if (m_overAboutBlinken)
> 		{
> 			p.translate((double)width() / 1.2445, (double)height() / 1.23);
> 			p.scale(xScaleArrowButton1, yScaleArrowButton1);
> -			m_renderer->render(&p, "arrow_down");
> +            m_renderer->render(&p, QStringLiteral("arrow_down"));
> 		}
> 		else if (m_overSettings)
> 		{
> 			p.translate((double)width() / 1.174, (double)height() / 1.345);
> 			p.scale(xScaleArrowButton2, yScaleArrowButton2);
> -			m_renderer->render(&p, "arrow_right");
> +            m_renderer->render(&p, QStringLiteral("arrow_right"));
> 		}
> 		else if (m_overManual)
> 		{
> 			p.translate((double)width() / 1.174, (double)height() / 1.5);
> 			p.scale(xScaleArrowButton2, yScaleArrowButton2);
> -			m_renderer->render(&p, "arrow_right");
> +            m_renderer->render(&p, QStringLiteral("arrow_right"));
> 		}
> 	}
> 	else
> 	{
> 		p.translate( (double)width() / 1.15, (double)height() / 1.2 );
> 		p.scale(xScaleSquareButtons, yScaleSquareButtons);
> -		m_renderer->render(&p, "help_normal");
> +        m_renderer->render(&p, QStringLiteral("help_normal"));
> 	}
> 	m_menuRect = QRect(qRound((double)width() / 1.15),
> 	                   qRound((double)height() / 1.2),
> @@ -749,14 +749,14 @@ void blinken::drawStatusText(QPainter &p)
> 	QString text;
> 	if (m_overQuit) text = i18n("Quit Blinken");
> 	else if (m_overHighscore || m_overCounter) text = i18n("View Highscore Table");
> -	else if (m_overAboutBlinken || m_overCentralLetters) text = m_helpMenu->action( \
>                 KHelpMenu::menuAboutApp )->text().remove('&');
> -	else if (m_overAboutKDE) text = m_helpMenu->action( KHelpMenu::menuAboutKDE \
> )->text().remove('&');  +    else if (m_overAboutBlinken || m_overCentralLetters) \
> text = m_helpMenu->action( KHelpMenu::menuAboutApp \
> )->text().remove(QLatin1Char('&')); +    else if (m_overAboutKDE) text = \
> m_helpMenu->action( KHelpMenu::menuAboutKDE )->text().remove(QLatin1Char('&'));  \
> else if (m_overSettings)  {
> 		if (!m_showPreferences) text = i18n("Show Settings");
> 		else text = i18n("Hide Settings");
> 	}
> -	else if (m_overManual) text = m_helpMenu->action( KHelpMenu::menuHelpContents \
> )->text().remove('&'); +    else if (m_overManual) text = m_helpMenu->action( \
> KHelpMenu::menuHelpContents )->text().remove(QLatin1Char('&'));  else if \
> (m_overLevels[0]) text = i18n("2nd Level");  else if (m_overLevels[1]) text = \
> i18n("1st Level");  else if (m_overLevels[2]) text = i18n("Random Level");
> @@ -846,7 +846,7 @@ void blinken::drawStatusText(QPainter &p)
> 	}
> 	
> 	QFont f;
> -	if (blinkenSettings::customFont() && !m_alwaysUseNonCoolFont) f = QFont("Steve");
> +    if (blinkenSettings::customFont() && !m_alwaysUseNonCoolFont) f = \
> QFont(QStringLiteral("Steve"));  p.setFont(f);
> 	f.setPointSize(KFontUtils::adaptFontSize(p, text, 380, 30, 28, 1, \
> KFontUtils::DoNotAllowWordWrap));  p.setFont(f);
> diff --git a/src/blinken.h b/src/blinken.h
> index 919e842..4b18a86 100644
> --- a/src/blinken.h
> +++ b/src/blinken.h
> @@ -38,7 +38,7 @@ Q_OBJECT
> 		void keyPressEvent(QKeyEvent *e) override;
> 		void keyReleaseEvent(QKeyEvent *e) override;
> 		
> -	private slots:
> +	private Q_SLOTS:
> 		void checkHS();
> 		void highlight(blinkenGame::color c, bool unhighlight);
> 		void unhighlight();
> diff --git a/src/blinkengame.h b/src/blinkengame.h
> index c1837be..e279a57 100644
> --- a/src/blinkengame.h
> +++ b/src/blinkengame.h
> @@ -43,12 +43,12 @@ Q_OBJECT
> 		void setPhase(gamePhase p);
> 		void start(int level);
> 	
> -	signals:
> +	Q_SIGNALS:
> 		void gameEnded();
> 		void phaseChanged();
> 		void highlight(blinkenGame::color c, bool unhighlight);
> 		
> -	private slots:
> +	private Q_SLOTS:
> 		void nextSound();
> 		void soundEnded();
> 		void unhighlight();
> diff --git a/src/button.cpp b/src/button.cpp
> index ccfb0bd..5187489 100644
> --- a/src/button.cpp
> +++ b/src/button.cpp
> @@ -83,19 +83,19 @@ QString button::getColorString() const
> 	switch (m_color)
> 	{
> 		case blinkenGame::blue:
> -			return "blue";
> +            return QStringLiteral("blue");
> 		break;
> 		
> 		case blinkenGame::yellow:
> -			return "yellow";
> +            return QStringLiteral("yellow");
> 		break;
> 		
> 		case blinkenGame::red:
> -			return "red";
> +            return QStringLiteral("red");
> 		break;
> 		
> 		case blinkenGame::green:
> -			return "green";
> +            return QStringLiteral("green");
> 		break;
> 		
> 		default:
> diff --git a/src/highscoredialog.cpp b/src/highscoredialog.cpp
> index 2b736ca..5493f9f 100644
> --- a/src/highscoredialog.cpp
> +++ b/src/highscoredialog.cpp
> @@ -67,9 +67,9 @@ void scoresWidget::paintEvent(QPaintEvent *)
> 	
> 	p.setPen(Qt::black);
> 	
> -	if (blinkenSettings::customFont()) f = QFont("Steve");
> +    if (blinkenSettings::customFont()) f = QFont(QStringLiteral("Steve"));
> 	p.setFont(f);
> -	f.setPointSize(KFontUtils::adaptFontSize(p, "A", 1000, namesFontSize, 28, 1, \
> KFontUtils::DoNotAllowWordWrap)); +    f.setPointSize(KFontUtils::adaptFontSize(p, \
> QStringLiteral("A"), 1000, namesFontSize, 28, 1, KFontUtils::DoNotAllowWordWrap));  \
> p.setFont(f);  
> 	p.translate(margin, margin);
> @@ -96,9 +96,9 @@ QSize scoresWidget::calcSize()
> 	QPainter p(&dummyPixmap);
> 	QFont f;
> 	
> -	if (blinkenSettings::customFont()) f = QFont("Steve");
> +    if (blinkenSettings::customFont()) f = QFont(QStringLiteral("Steve"));
> 	p.setFont(f);
> -	f.setPointSize(KFontUtils::adaptFontSize(p, "A", 1000, namesFontSize, 28, 1, \
> KFontUtils::DoNotAllowWordWrap)); +    f.setPointSize(KFontUtils::adaptFontSize(p, \
> QStringLiteral("A"), 1000, namesFontSize, 28, 1, KFontUtils::DoNotAllowWordWrap));  \
> p.setFont(f);  for (int i = 0; i < 3; i++)
> 	{
> @@ -207,12 +207,12 @@ void highScoreManager::addScore(int level, int score, const \
> QString &name)  m_scores[level].insert(it, qMakePair(score, name));
> 		m_scores[level].erase(--m_scores[level].end());
> 		
> -		KConfigGroup cfg(KSharedConfig::openConfig(), QString("Level%1").arg(level + \
> 1)); +        KConfigGroup cfg(KSharedConfig::openConfig(), \
> QStringLiteral("Level%1").arg(level + 1));  int j;
> 		for (it = m_scores[level].begin(), j = 1; it != m_scores[level].end(); ++it, j++)
> 		{
> -			cfg.writeEntry(QString("Score%1").arg(j), (*it).first);
> -			cfg.writeEntry(QString("Name%1").arg(j), (*it).second);
> +            cfg.writeEntry(QStringLiteral("Score%1").arg(j), (*it).first);
> +            cfg.writeEntry(QStringLiteral("Name%1").arg(j), (*it).second);
> 		}
> 		cfg.sync();
> 
> @@ -234,10 +234,10 @@ void highScoreManager::update()
> 	}
> 	for (int i = 1; i <= 3; i++)
> 	{
> -		KConfigGroup cfg(KSharedConfig::openConfig(), QString("Level%1").arg(i));
> +        KConfigGroup cfg(KSharedConfig::openConfig(), \
> QStringLiteral("Level%1").arg(i));  for (int j = 1; j <= 5; j++)
> 		{
> -			m_scores[i-1].append(qMakePair(cfg.readEntry(QString("Score%1").arg(j),QVariant(0)).toInt(),cfg.readEntry(QString("Name%1").arg(j),QString())));
>  +            m_scores[i-1].append(qMakePair(cfg.readEntry(QStringLiteral("Score%1") \
> .arg(j),QVariant(0)).toInt(),cfg.readEntry(QStringLiteral("Name%1").arg(j),QString())));
>   }
> 	}
> }
> diff --git a/src/main.cpp b/src/main.cpp
> index 7802bc9..bb9d163 100644
> --- a/src/main.cpp
> +++ b/src/main.cpp
> @@ -27,10 +27,10 @@ int main(int argc, char *argv[])
> 	KLocalizedString::setApplicationDomain("blinken");
> 
> 	QApplication app(argc, argv);
> -	KAboutData about("blinken", i18n("Blinken"), "0.4", i18n("A memory enhancement \
> game"), KAboutLicense::GPL, i18n("© 2005-2007 Albert Astals Cid\n© 2005-2007 Danny \
>                 Allen"));
> -	about.addAuthor(i18n("Albert Astals Cid"), i18n("Coding"), "aacid@kde.org");
> -	about.addAuthor(i18n("Danny Allen"), i18n("Design, Graphics and Sounds"), \
>                 "danny@dannyallen.co.uk");
> -	about.addCredit(i18n("Steve Jordi"), i18n("GPL'ed his 'Steve' font so that we \
> could use it"), "steve@sjordi.com"); +    KAboutData \
> about(QStringLiteral("blinken"), i18n("Blinken"), QStringLiteral("0.4"), i18n("A \
> memory enhancement game"), KAboutLicense::GPL, i18n("© 2005-2007 Albert Astals \
> Cid\n© 2005-2007 Danny Allen")); +    about.addAuthor(i18n("Albert Astals Cid"), \
> i18n("Coding"), QStringLiteral("aacid@kde.org")); +    about.addAuthor(i18n("Danny \
> Allen"), i18n("Design, Graphics and Sounds"), \
> QStringLiteral("danny@dannyallen.co.uk")); +    about.addCredit(i18n("Steve \
> Jordi"), i18n("GPL'ed his 'Steve' font so that we could use it"), \
> QStringLiteral("steve@sjordi.com")); 
> 	KAboutData::setApplicationData(about);
> 
> @@ -48,11 +48,11 @@ int main(int argc, char *argv[])
> 
> 	app.setWindowIcon(QIcon::fromTheme(QLatin1String("blinken")));
> 
> -	QFont f("Steve", 12, QFont::Normal, true);
> +    QFont f(QStringLiteral("Steve"), 12, QFont::Normal, true);
> 	// Works with Steve may need some tweaking to work with other fonts
> 	if (!QFontInfo(f).exactMatch())
> 	{
> -		QFontDatabase::addApplicationFont(QStandardPaths::locate(QStandardPaths::DataLocation, \
> "fonts/steve.ttf")); +        \
> QFontDatabase::addApplicationFont(QStandardPaths::locate(QStandardPaths::DataLocation, \
> QStringLiteral("fonts/steve.ttf")));  }
> 	KDBusService service;
> 	new blinken();
> diff --git a/src/number.cpp b/src/number.cpp
> index be09954..d9494a4 100644
> --- a/src/number.cpp
> +++ b/src/number.cpp
> @@ -37,44 +37,44 @@ void number::paint(QPainter &p, int digits, QSvgRenderer \
> *renderer) const void number::paintDigit(QPainter &p, int number, QSvgRenderer \
> *renderer) const {
> 	// make gcc  happy
> -	QString n = "zero";
> +    QString n = QStringLiteral("zero");
> 	
> 	switch (number)
> 	{
> 		case 1:
> -			n = "one";
> +            n = QStringLiteral("one");
> 		break;
> 		
> 		case 2:
> -			n = "two";
> +            n = QStringLiteral("two");
> 		break;
> 		
> 		case 3:
> -			n = "three";
> +            n = QStringLiteral("three");
> 		break;
> 		
> 		case 4:
> -			n = "four";
> +            n = QStringLiteral("four");
> 		break;
> 		
> 		case 5:
> -			n = "five";
> +            n = QStringLiteral("five");
> 		break;
> 		
> 		case 6:
> -			n = "six";
> +            n = QStringLiteral("six");
> 		break;
> 		
> 		case 7:
> -			n = "seven";
> +            n = QStringLiteral("seven");
> 		break;
> 		
> 		case 8:
> -			n = "eight";
> +            n = QStringLiteral("eight");
> 		break;
> 		
> 		case 9:
> -			n = "nine";
> +            n = QStringLiteral("nine");
> 		break;
> 	}
> 	
> diff --git a/src/soundsplayer.cpp b/src/soundsplayer.cpp
> index c56840b..73d43c2 100644
> --- a/src/soundsplayer.cpp
> +++ b/src/soundsplayer.cpp
> @@ -20,11 +20,11 @@ soundsPlayer::soundsPlayer()
> 	Phonon::createPath(&m_mediaObject, &m_audioOutput);
> 	connect(&m_mediaObject, &Phonon::MediaObject::finished, this, \
> &soundsPlayer::playEnded); 
> -	m_allSound = QStandardPaths::locate(QStandardPaths::DataLocation, \
>                 "sounds/lose.wav");
> -	m_greenSound = QStandardPaths::locate(QStandardPaths::DataLocation, \
>                 "sounds/1.wav");
> -	m_redSound = QStandardPaths::locate(QStandardPaths::DataLocation, \
>                 "sounds/2.wav");
> -	m_blueSound = QStandardPaths::locate(QStandardPaths::DataLocation, \
>                 "sounds/3.wav");
> -	m_yellowSound = QStandardPaths::locate(QStandardPaths::DataLocation, \
> "sounds/4.wav"); +    m_allSound = \
> QStandardPaths::locate(QStandardPaths::DataLocation, \
> QStringLiteral("sounds/lose.wav")); +    m_greenSound = \
> QStandardPaths::locate(QStandardPaths::DataLocation, \
> QStringLiteral("sounds/1.wav")); +    m_redSound = \
> QStandardPaths::locate(QStandardPaths::DataLocation, \
> QStringLiteral("sounds/2.wav")); +    m_blueSound = \
> QStandardPaths::locate(QStandardPaths::DataLocation, \
> QStringLiteral("sounds/3.wav")); +    m_yellowSound = \
> QStandardPaths::locate(QStandardPaths::DataLocation, \
> QStringLiteral("sounds/4.wav")); 
> 	connect(&m_warnTimer, &QTimer::timeout, this, &soundsPlayer::ended);
> 	m_warnTimer.setSingleShot(true);
> diff --git a/src/soundsplayer.h b/src/soundsplayer.h
> index f5b57d5..840d07a 100644
> --- a/src/soundsplayer.h
> +++ b/src/soundsplayer.h
> @@ -26,10 +26,10 @@ Q_OBJECT
> 		
> 		void play(blinkenGame::color c);
> 		
> -	signals:
> +	Q_SIGNALS:
> 		void ended();
> 		
> -	private slots:
> +	private Q_SLOTS:
> 		void playEnded();
> 		
> 	private:
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic