GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sqlitebrowser/src/IconCache.cpp at master · sqlitebrowser/sqlitebrowser

Expand file tree

/

IconCache.cpp

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
22 lines (18 loc) · 731 Bytes
/

IconCache.cpp

Copy path

File metadata and controls

22 lines (18 loc) · 731 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "IconCache.h"
QIcon IconCache::null_icon;
std::unordered_map<std::string, QIcon> IconCache::icons;
const QIcon& IconCache::get(const std::string& name)
{
// Check if we already have an icon object with that name in the cache. If so, just return that
auto it = icons.find(name);
if(it != icons.end())
return it->second;
// If now, try to load an icon with that name and insert it into the cache
QIcon icon(":/icons/" + QString::fromStdString(name));
auto ins = icons.insert({name, icon});
// If the insertion was successful, return the inserted icon object. If it was not, return a null icon.
if(ins.second)
return ins.first->second;
else
return null_icon;
}
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.