Fix win build, add some pvanek enhancements.
This commit is contained in:
		
							parent
							
								
									974e324b83
								
							
						
					
					
						commit
						92ed711c00
					
				
					 6 changed files with 16 additions and 12 deletions
				
			
		
							
								
								
									
										1
									
								
								src/librssguard/gui/messagepreviewer.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										1
									
								
								src/librssguard/gui/messagepreviewer.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -9,6 +9,7 @@
 | 
			
		|||
#include "network-web/webfactory.h"
 | 
			
		||||
#include "services/abstract/serviceroot.h"
 | 
			
		||||
 | 
			
		||||
#include <QKeyEvent>
 | 
			
		||||
#include <QScrollBar>
 | 
			
		||||
#include <QToolBar>
 | 
			
		||||
#include <QToolTip>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								src/librssguard/miscellaneous/iconfactory.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										2
									
								
								src/librssguard/miscellaneous/iconfactory.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -86,7 +86,7 @@ void IconFactory::loadCurrentIconTheme() {
 | 
			
		|||
  else {
 | 
			
		||||
    // Desired icon theme is not currently available.
 | 
			
		||||
    // Install "default" icon theme instead.
 | 
			
		||||
    qWarning("Icon theme '%s' cannot be loaded because it is not installed. No icon theme (or default icon theme) is loaded now.",
 | 
			
		||||
    qWarning("Icon theme '%s' cannot be loaded because it is not installed. No icon theme (or default/system icon theme) is loaded now.",
 | 
			
		||||
             qPrintable(theme_name_from_settings));
 | 
			
		||||
    QIcon::setThemeName(APP_NO_THEME);
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								src/librssguard/miscellaneous/iofactory.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										4
									
								
								src/librssguard/miscellaneous/iofactory.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -26,7 +26,9 @@ bool IOFactory::isFolderWritable(const QString& folder) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
QString IOFactory::getSystemFolder(QStandardPaths::StandardLocation location) {
 | 
			
		||||
  return QStandardPaths::writableLocation(location);
 | 
			
		||||
  QStringList locations = QStandardPaths::standardLocations(location);
 | 
			
		||||
 | 
			
		||||
  return locations.isEmpty() ? QString() : locations.at(0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString IOFactory::ensureUniqueFilename(const QString& name, const QString& append_format) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								src/librssguard/miscellaneous/settings.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										4
									
								
								src/librssguard/miscellaneous/settings.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -247,7 +247,7 @@ DVALUE(bool) Downloads::AlwaysPromptForFilenameDef = false;
 | 
			
		|||
 | 
			
		||||
DKEY Downloads::TargetDirectory = "target_directory";
 | 
			
		||||
 | 
			
		||||
DVALUE(QString) Downloads::TargetDirectoryDef = IOFactory::getSystemFolder(QStandardPaths::DesktopLocation);
 | 
			
		||||
DVALUE(QString) Downloads::TargetDirectoryDef = IOFactory::getSystemFolder(QStandardPaths::DownloadLocation);
 | 
			
		||||
 | 
			
		||||
DKEY Downloads::RemovePolicy = "remove_policy";
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -255,7 +255,7 @@ DVALUE(int) Downloads::RemovePolicyDef = DownloadManager::Never;
 | 
			
		|||
 | 
			
		||||
DKEY Downloads::TargetExplicitDirectory = "target_explicit_directory";
 | 
			
		||||
 | 
			
		||||
DVALUE(QString) Downloads::TargetExplicitDirectoryDef = IOFactory::getSystemFolder(QStandardPaths::DesktopLocation);
 | 
			
		||||
DVALUE(QString) Downloads::TargetExplicitDirectoryDef = IOFactory::getSystemFolder(QStandardPaths::DownloadLocation);
 | 
			
		||||
 | 
			
		||||
DKEY Downloads::ShowDownloadsWhenNewDownloadStarts = "show_downloads_on_new_download_start";
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								src/librssguard/services/abstract/feed.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										2
									
								
								src/librssguard/services/abstract/feed.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -67,7 +67,7 @@ QVariant Feed::data(int column, int role) const {
 | 
			
		|||
    case Qt::ForegroundRole:
 | 
			
		||||
      switch (status()) {
 | 
			
		||||
        case NewMessages:
 | 
			
		||||
          return QColor(Qt::blue);
 | 
			
		||||
          return qApp->palette().color(QPalette::Active, QPalette::BrightText);
 | 
			
		||||
 | 
			
		||||
        case NetworkError:
 | 
			
		||||
        case ParsingError:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										15
									
								
								src/rssguard/main.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										15
									
								
								src/rssguard/main.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -26,9 +26,17 @@ int main(int argc, char* argv[]) {
 | 
			
		|||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
 | 
			
		||||
  QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
 | 
			
		||||
 | 
			
		||||
  // Ensure that ini format is used as application settings storage on Mac OS.
 | 
			
		||||
  QSettings::setDefaultFormat(QSettings::IniFormat);
 | 
			
		||||
 | 
			
		||||
#if defined (Q_OS_MAC)
 | 
			
		||||
  QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
 | 
			
		||||
  disableWindowTabbing();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  // Instantiate base application object.
 | 
			
		||||
  Application application(APP_LOW_NAME, argc, argv);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -44,13 +52,6 @@ int main(int argc, char* argv[]) {
 | 
			
		|||
  // Load localization and setup locale before any widget is constructed.
 | 
			
		||||
  qApp->localization()->loadActiveLanguage();
 | 
			
		||||
  qApp->setFeedReader(new FeedReader(&application));
 | 
			
		||||
  QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
 | 
			
		||||
  QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
 | 
			
		||||
 | 
			
		||||
#if defined (Q_OS_MAC)
 | 
			
		||||
  QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
 | 
			
		||||
  disableWindowTabbing();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  // Register needed metatypes.
 | 
			
		||||
  qRegisterMetaType<QList<Message>>("QList<Message>");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue