Skip to content

Commit

Permalink
Qt 5.8 でコンパイルできなくなっていたのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Feb 2, 2017
1 parent cb81383 commit 776ab89
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SkyMPC, The MPD Client
Copyright (C) 2016 S.Fuchita
Copyright (C) 2017 S.Fuchita
web: http://www.soramimi.jp/
mail: fi7s-fct@asahi-net.or.jp
twitter: @soramimi_jp
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>1.6.1</string>
<string>1.6.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
Expand Down
15 changes: 9 additions & 6 deletions src/PlaylistFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,13 @@ bool PlaylistFile::parse_xspf(char const *begin, char const *end, std::vector<Pl
if (!state_stack.empty()) {
laststate = state_stack.back();
}
auto CompareName = [&](QString const &name){
return reader.name().compare(name, Qt::CaseInsensitive) == 0;
};
switch (reader.readNext()) {
case QXmlStreamReader::StartElement:
if (state_stack.empty()) {
if (reader.name().compare("playlist", Qt::CaseInsensitive) == 0) {
if (CompareName("playlist")) {
QStringRef data;
// QXmlStreamAttributes atts = reader.attributes();
data = reader.namespaceUri();
Expand All @@ -147,21 +150,21 @@ bool PlaylistFile::parse_xspf(char const *begin, char const *end, std::vector<Pl
state = STATE_PLAYLIST;
}
} else if (laststate == STATE_PLAYLIST) {
if (reader.name().compare("title", Qt::CaseInsensitive) == 0) {
if (CompareName("title")) {
state = STATE_PLAYLIST_TITLE;
} else if (reader.name().compare("tracklist", Qt::CaseInsensitive) == 0) {
} else if (CompareName("tracklist")) {
state = STATE_PLAYLIST_TRACKLIST;
}
} else if (laststate == STATE_PLAYLIST_TITLE) {
} else if (laststate == STATE_PLAYLIST_TRACKLIST) {
if (reader.name().compare("track", Qt::CaseInsensitive) == 0) {
if (CompareName("track")) {
song = Item();
state = STATE_PLAYLIST_TRACKLIST_TRACK;
}
} else if (laststate == STATE_PLAYLIST_TRACKLIST_TRACK) {
if (reader.name().compare("location", Qt::CaseInsensitive) == 0) {
if (CompareName("location")) {
state = STATE_PLAYLIST_TRACKLIST_TRACK_LOCATION;
} else if (reader.name().compare("title", Qt::CaseInsensitive) == 0) {
} else if (CompareName("title")) {
state = STATE_PLAYLIST_TRACKLIST_TRACK_TITLE;
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/version.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@

#include "version.h"

char const *SkyMPC_Version = "1.6.1";
int const SkyMPC_Year = 2016;
char const *SkyMPC_Version = "1.6.2";
int const SkyMPC_Year = 2017;

/*
1.6.2 (2017-02-02)
・Qt 5.8 でコンパイルできなくなっていたのを修正
1.6.1 (2016-04-10)
・Linux:日本語入力対応
Expand Down
4 changes: 2 additions & 2 deletions winrc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Product = "SkyMPC"
CompanyName = "S.Fuchita"
Description = "a MPD client"
LegalCopyright = "Copyright (C) 2016 S.Fuchita (@soramimi_jp)"
LegalCopyright = "Copyright (C) 2017 S.Fuchita (@soramimi_jp)"
OriginalFilename = "SkyMPC.exe"
Version = "1.6.1.0"
Version = "1.6.2.0"

$version1 = "0"
$version2 = "0"
Expand Down

0 comments on commit 776ab89

Please sign in to comment.