Skip to content
Browse files

[info] don't ToLower() info conditions prior to resolving them - we n…

…eed only compare them caseless in the info store
  • Loading branch information...
1 parent 0c58c2f commit 880266a14b6c77bd6f1d33b45fdc8029ea7e3a87 Jonathan Marshall committed
View
8 XBMC.xcodeproj/project.pbxproj
@@ -284,6 +284,9 @@
7C1409A9184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; };
7C1409AA184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; };
7C1409AB184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; };
+ 7C15DCBC1892481400FCE564 /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C15DCBB1892481300FCE564 /* InfoBool.cpp */; };
+ 7C15DCBD1892481400FCE564 /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C15DCBB1892481300FCE564 /* InfoBool.cpp */; };
+ 7C15DCBE1892481400FCE564 /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C15DCBB1892481300FCE564 /* InfoBool.cpp */; };
7C1A492315A962EE004AF4A4 /* SeekHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1A492115A962EE004AF4A4 /* SeekHandler.cpp */; };
7C1A85661520522500C63311 /* TextureCacheJob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1A85631520522500C63311 /* TextureCacheJob.cpp */; };
7C1D682915A7D2FD00658B65 /* DatabaseManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1D682715A7D2FD00658B65 /* DatabaseManager.cpp */; };
@@ -3744,6 +3747,7 @@
7C140988183224B8009F9411 /* SettingUpdate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingUpdate.h; path = lib/SettingUpdate.h; sourceTree = "<group>"; };
7C1409A7184015C6009F9411 /* InfoExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoExpression.cpp; sourceTree = "<group>"; };
7C1409A8184015C8009F9411 /* InfoExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoExpression.h; sourceTree = "<group>"; };
+ 7C15DCBB1892481300FCE564 /* InfoBool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoBool.cpp; sourceTree = "<group>"; };
7C1A492115A962EE004AF4A4 /* SeekHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SeekHandler.cpp; sourceTree = "<group>"; };
7C1A492215A962EE004AF4A4 /* SeekHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SeekHandler.h; sourceTree = "<group>"; };
7C1A495B15A96918004AF4A4 /* SaveFileStateJob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaveFileStateJob.h; sourceTree = "<group>"; };
@@ -6751,6 +6755,7 @@
7C89674213C03B21003631FE /* info */ = {
isa = PBXGroup;
children = (
+ 7C15DCBB1892481300FCE564 /* InfoBool.cpp */,
7C89674413C03B22003631FE /* InfoBool.h */,
7C1409A7184015C6009F9411 /* InfoExpression.cpp */,
7C1409A8184015C8009F9411 /* InfoExpression.h */,
@@ -10751,6 +10756,7 @@
DF0ABB73183A94A30018445D /* Utf8Utils.cpp in Sources */,
7C1409A9184015C9009F9411 /* InfoExpression.cpp in Sources */,
AE32174218313ADF0003FAFC /* XSLTUtils.cpp in Sources */,
+ 7C15DCBC1892481400FCE564 /* InfoBool.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -11794,6 +11800,7 @@
DF0ABB75183A94A30018445D /* Utf8Utils.cpp in Sources */,
7C1409AB184015C9009F9411 /* InfoExpression.cpp in Sources */,
AE32174318313AE10003FAFC /* XSLTUtils.cpp in Sources */,
+ 7C15DCBE1892481400FCE564 /* InfoBool.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -12839,6 +12846,7 @@
DF0ABB74183A94A30018445D /* Utf8Utils.cpp in Sources */,
7C1409AA184015C9009F9411 /* InfoExpression.cpp in Sources */,
AE4E87A717354C4A00D15206 /* XSLTUtils.cpp in Sources */,
+ 7C15DCBD1892481400FCE564 /* InfoBool.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
1 project/VS2010Express/XBMC.vcxproj
@@ -639,6 +639,7 @@
<ClCompile Include="..\..\xbmc\interfaces\Builtins.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\generic\LanguageInvokerThread.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\generic\ScriptInvocationManager.cpp" />
+ <ClCompile Include="..\..\xbmc\interfaces\info\InfoBool.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\info\InfoExpression.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\info\SkinVariable.cpp" />
<ClCompile Include="..\..\xbmc\interfaces\json-rpc\AddonsOperations.cpp" />
View
3 project/VS2010Express/XBMC.vcxproj.filters
@@ -1906,6 +1906,9 @@
<ClCompile Include="..\..\xbmc\input\InertialScrollingHandler.cpp">
<Filter>input</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\interfaces\info\InfoBool.cpp">
+ <Filter>interfaces\info</Filter>
+ </ClCompile>
<ClCompile Include="..\..\xbmc\interfaces\info\InfoExpression.cpp">
<Filter>interfaces\info</Filter>
</ClCompile>
View
1 xbmc/GUIInfoManager.cpp
@@ -2162,7 +2162,6 @@ INFO::InfoPtr CGUIInfoManager::Register(const CStdString &expression, int contex
{
CStdString condition(CGUIInfoLabel::ReplaceLocalize(expression));
StringUtils::Trim(condition);
- StringUtils::ToLower(condition);
if (condition.empty())
return INFO::InfoPtr();
View
35 xbmc/interfaces/info/InfoBool.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "InfoBool.h"
+#include "utils/StringUtils.h"
+
+namespace INFO
+{
+ InfoBool::InfoBool(const std::string &expression, int context)
+ : m_value(false),
+ m_context(context),
+ m_listItemDependent(false),
+ m_expression(expression),
+ m_dirty(true)
+ {
+ StringUtils::ToLower(m_expression);
+ }
+}
View
10 xbmc/interfaces/info/InfoBool.h
@@ -34,15 +34,7 @@ namespace INFO
class InfoBool
{
public:
- InfoBool(const std::string &expression, int context)
- : m_value(false),
- m_context(context),
- m_listItemDependent(false),
- m_expression(expression),
- m_dirty(true)
- {
- };
-
+ InfoBool(const std::string &expression, int context);
virtual ~InfoBool() {};
/*! \brief Set the info bool dirty.
View
3 xbmc/interfaces/info/Makefile
@@ -1,4 +1,5 @@
-SRCS=InfoExpression.cpp \
+SRCS=InfoBool.cpp \
+ InfoExpression.cpp \
SkinVariable.cpp \
LIB=info.a

0 comments on commit 880266a

Please sign in to comment.
Something went wrong with that request. Please try again.